tfSheapMalloc

Jump to: navigation, search

Table of Contents >> Programmer's Reference


#include <trsocket.h>


void * tfSheapMalloc (unsigned size);


Function Description

This function is a simple heap allocation. It is used by the Treck stack in two scenarios:

  1. When TM_USE_SHEAP and TM_SHEAP_SIZE are defined in <trsystem.h>, or
  2. When it is called from tfKernelMalloc() and TM_SHEAP_SIZE is defined in <trsystem.h>.


Warning Warning: This function should NEVER be called directly by a user application.


Parameters

  • size
    The number of bytes to allocate.


Returns

  • (void *)0
    Failure.
  • (Other)
    Success.


Table of Contents >> Programmer's Reference