James
2011-02-21 08:29:19 UTC
I just find it a little weird to see it referenced sometimes as "ec_malloc()".. my guess is "error check".. but if there really a difference and are there other prefixes?
but maybe Im ahead of myself.. I am still concern with why to allocate additional memory in the heap..
from my understanding of memory allocation the data and bss segments store global and static variables
and the stack stores local function variable..
I just find it weird to allocate memory in the heap when I could store it elsewhere(by declaring a variable earlier or just in a local function) .. maybe a practical application is what I need?
I also am under the impressions when using malloc its only applicable to access using pointers? just want to verify this or be corrected.
I wonder if c++ uses malloc() as well?
again,
Thank you very much and appreciate your help!