projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update vendored msgpack-c to 4.0.0
[lttng-tools.git]
/
src
/
vendor
/
msgpack
/
zone.h
diff --git
a/src/vendor/msgpack/zone.h
b/src/vendor/msgpack/zone.h
index 9005be7937399df8b9ccbf44904f3e3a8c5033e3..7facd547c288b0816630fa290dcc2139818ba8cc 100644
(file)
--- a/
src/vendor/msgpack/zone.h
+++ b/
src/vendor/msgpack/zone.h
@@
-107,9
+107,9
@@
static inline void* msgpack_zone_malloc(msgpack_zone* zone, size_t size)
{
char* aligned =
(char*)(
{
char* aligned =
(char*)(
- (
size
_t)(
+ (
uintptr
_t)(
zone->chunk_list.ptr + (MSGPACK_ZONE_ALIGN - 1)
zone->chunk_list.ptr + (MSGPACK_ZONE_ALIGN - 1)
- )
/ MSGPACK_ZONE_ALIGN * MSGPACK_ZONE_ALIGN
+ )
& ~(uintptr_t)(MSGPACK_ZONE_ALIGN - 1)
);
size_t adjusted_size = size + (size_t)(aligned - zone->chunk_list.ptr);
if(zone->chunk_list.free >= adjusted_size) {
);
size_t adjusted_size = size + (size_t)(aligned - zone->chunk_list.ptr);
if(zone->chunk_list.free >= adjusted_size) {
@@
-120,7
+120,7
@@
static inline void* msgpack_zone_malloc(msgpack_zone* zone, size_t size)
{
void* ptr = msgpack_zone_malloc_expand(zone, size + (MSGPACK_ZONE_ALIGN - 1));
if (ptr) {
{
void* ptr = msgpack_zone_malloc_expand(zone, size + (MSGPACK_ZONE_ALIGN - 1));
if (ptr) {
- return (char*)((
size_t)(ptr) / MSGPACK_ZONE_ALIGN * MSGPACK_ZONE_ALIGN
);
+ return (char*)((
uintptr_t)(ptr) & ~(uintptr_t)(MSGPACK_ZONE_ALIGN - 1)
);
}
}
return NULL;
}
}
return NULL;
This page took
0.023273 seconds
and
4
git commands to generate.