clib_mem_size() returns the object’s capacity, which will be >= number of bytes 
requested...


From: [email protected] <[email protected]> On Behalf Of 
[email protected]
Sent: Thursday, August 27, 2020 11:26 PM
To: [email protected]
Subject: [vpp-dev] clib_mem_size return wrong mem size

Hi, experts:
     I find clib_mem_size(...) cann't return the mem size alloc by 
clib_mem_alloc(...). I alloc 32 bytes memory, but clib_mem_size return 44 
length as following snippet:
u32 len, real_len;
void* p;

len = 32;
p = clib_mem_alloc(len);
real_len = clib_mem_size(p);

ASSERT(real_len == len);
It's a bug or my usage of clib_mem_size wrong ?
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#17297): https://lists.fd.io/g/vpp-dev/message/17297
Mute This Topic: https://lists.fd.io/mt/76466873/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to