Re: Malloc tests

2022-01-19 Thread Joel Sherrill
On Fri, Jan 7, 2022 at 8:25 PM zack leung wrote: > > I think that the malloc tests is calculated differently than alloc_size+ > allocsize mod it looks like this > *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; > when i run the comparison i get 8 (with

Re: Malloc tests

2022-01-13 Thread zack leung
There a way to get the same values used to make the calculation in malloc get usable size? Bump Il ven 7 gen 2022, 21:25 zack leung ha scritto: > I think that the malloc tests is calculated differently than alloc_size+ > allocsize mod it looks like this > *alloc_size = (uintptr_t) n

Re: Malloc tests

2022-01-07 Thread zack leung
I think that the malloc tests is calculated differently than alloc_size+ allocsize mod it looks like this *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; when i run the comparison i get 8 (with heap alignment) and the function gives me 12. is the heap alloc bonus part

Re: Malloc tests

2022-01-06 Thread Joel Sherrill
On Thu, Jan 6, 2022 at 2:55 PM Gedare Bloom wrote: > > On Tue, Jan 4, 2022 at 6:10 PM zack leung wrote: > > > > Helllo , > > I'm working on a patch for malloc_get_usable size right now so far i have > > this test case for malloc, I just make sure that the value is null and i > > just malloc an

Re: Malloc tests

2022-01-06 Thread Gedare Bloom
On Tue, Jan 4, 2022 at 6:10 PM zack leung wrote: > > Helllo , > I'm working on a patch for malloc_get_usable size right now so far i have > this test case for malloc, I just make sure that the value is null and i > just malloc an int and then i make a call to the function malloc_usable > size

Malloc tests

2022-01-04 Thread zack leung
Helllo , I'm working on a patch for malloc_get_usable size right now so far i have this test case for malloc, I just make sure that the value is null and i just malloc an int and then i make a call to the function malloc_usable size and then i compare it like this. static void