What are the different types of malloc() function in C?

What are the different types of malloc() function in C?

Some malloc() functions of C with their function and description are given below:

void * malloc( size_t size ); : The ANSI C standard memory allocation function.
void _ based( void ) *_bmalloc( _ segment seg, size_t size ); : Does based memory allocation.The memory is allocated from the segment you specify.
void _ far *_fmalloc( size_tsize ); : Allocates a block of memory outside the default data segment,
returning a far pointer. This function is called by malloc()when the large or compact memory model is specified. 
void _ near *_nmalloc( size_t size ); : Allocates block of memory inside the default data segment, returning a near pointer. This function is
called by malloc() when the small or medium memory model is specified.

By:Vivek Kr. Agarwal
Date:2007-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Subjective Links

C Subjective interview questions and answers for experienced and fresher