m_alloc
This call attempts to expand the data space occupied by the application by exp_size bytes.
- Syntax: char * m_alloc(unsigned int exp_size)
- Parameters: unsigned int exp_size - Amount of space (in bytes) to expand the data
space (rounded to the next multiple of 16)
- Returns: 0 - for failure
Failure may be caused by a request which would grow the applications
total data space beyond 64K or by an exhaustion of system memory.
Offset (near address in AX) of the new buffer - if successful
- Related Calls: m_alloc_large
- Comments: If exp_size is not a multiple of 16 (the size of a paragraph), it will
be rounded up to the next multiple.
On first call, the new block will follow the stack of application.
On subsequent calls, new blocks will immediately follow previous
allocation.
Do not call after making calls to m_get_far_block.
Memory Stack