[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
farmalloc()              Allocate Memory from Far Heap

 #include   <alloc.h>

 void far       *farmalloc(size);
 unsigned long  size;                    Size of memory block

    farmalloc() allocates a block of memory 'size' bytes long from the
    far heap.  For allocating from the far heap, note that:

                    all of available RAM can be allocated
                    blocks larger than 64K can be allocated
                    far pointers are used to access the allocated blocks.

    Returns:    A pointer to the newly allocated block, or NULL if not
                enough space exists for the new block.

      Notes:    farmalloc() differs from malloc() in that it takes
                unsigned long parameters; malloc() take unsigned.

                The tiny model cannot make use of farmalloc() because it
                cannot have any segment fixups (which are often produced
                by far pointers).

See Also: farcalloc() farcoreleft() farfree() farrealloc()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson