ResMemSO Resize a block of memory allocated via GetMemSO.

Inputs: AX = 0ff2dh

SI:DI = Selector:offset of block to resize

CX:DX = New size of block required in bytes

Outputs: Carry set on error else,

SI:DI = selector:offset of new memory block address.

Errors: If an invalid selector:offset is passed in SI:DI or not enough memory is available when increasing the block size, then this function returns carry set.

Notes: If the memory block cannot be resized in its current location, but a free block of memory of the new size exists, the memory is copied to a new block and the old one is released. The selector:offset will change if this occurs, so the SI:DI return value should be used to update all references and pointers to the memory block when this function is called.

ResMem32 Resize a previously allocated block of memory.

Inputs: AX = 0ff0eh

BX = Selector for block.

ECX = New size of block required in bytes.

Outputs: Carry set on error.

Errors: See ResMem

Notes: If the memory block cannot be resized in its current location, but a free block of memory of the new size exists, the memory is copied to a new block and the old one released. This is transparent to the application as long as only the selector originally allocated with GetMem is used to access the memory.

Next Page

Previous Page

Go to Table of Contents

Go back to Devore Software & Consulting home page