D
dsptechie
I wanted to how exactly malloc() function works. I came to know that
malloc() allocates memory only in powers of 2. i.e if asked for say 17
bytes , in the process, it allocates 32 bytes and returns 17 bytes so
15 bytes are wasted...
Is this true...If anybody knows the algorithm details of malloc()
plase share the same.
Is this one of the reason why malloc() is not generally preferred in
embedded systems..?
Thanks in advance.
malloc() allocates memory only in powers of 2. i.e if asked for say 17
bytes , in the process, it allocates 32 bytes and returns 17 bytes so
15 bytes are wasted...
Is this true...If anybody knows the algorithm details of malloc()
plase share the same.
Is this one of the reason why malloc() is not generally preferred in
embedded systems..?
Thanks in advance.