MALLOC - dynamic storage allocation.

(ANSI Standard)


char *malloc();
ptr = malloc( size );


unsigned size;
tells the number of bytes of memory that should be obtained.
char *ptr;
points to the memory that has been obtained.


"malloc" returns a pointer to space starting at a double word boundary suitable for storing an object of any type. This space is at least "size" bytes long.

"malloc" returns the NULL pointer if memory cannot be acquired or the requested size is improperly specified.

See Also:

expl nsc lib calloc

expl nsc lib realloc

expl nsc lib free

Copyright © 1996, Thinkage Ltd.