Generated from cl_memory.h with ROBODoc v3.2.3 on Sat Jan 18 07:05:18 2003

TABLE OF CONTENTS

  1. Public/Memory Management
  2. Public: Memory Management/cl_free
  3. Public: Memory Management/cl_malloc
  4. Public: Memory Management/cl_mem_display
  5. Public: Memory Management/cl_memclr
  6. Public: Memory Management/cl_memcmp
  7. Public: Memory Management/cl_memcpy
  8. Public: Memory Management/cl_memset
  9. Public: Memory Management/cl_zalloc

Public/Memory Management

NAME
    Memory Management

DESCRIPTION
    The memory management functionality provides memory manipulation
    functions as well as powerful debugging tools.

    The Allocation Tracking functionality provides a means for tracking memory 
    allocations in order to detect memory leaks.

    Memory allocation tracking stores the file name and line number where 
    allocations occur. Gathering this information does have an adverse impact 
    on performance, and memory tracking should therefore not be enabled in 
    release builds of software.

    Memory tracking is compiled into the debug version of the library, 
    and can be enabled for the release version as well. To Enable memory 
    tracking in a release build of the public layer, users should define 
    the MEM_TRACK_ON keyword for compilation.

Public: Memory Management/cl_free

NAME
    cl_free

DESCRIPTION
    The cl_free function deallocates a block of memory.

SYNOPSIS
void
cl_free( 
    IN  void* const p_memory );

PARAMETERS
    p_memory 
        [in] Pointer to a memory block.

RETURN VALUE
    This function does not return a value.

NOTES
    The p_memory parameter is the pointer returned by a previous call to
    cl_malloc, or cl_zalloc.

    cl_free has no effect if p_memory is NULL.

SEE ALSO
    Memory Management, cl_alloc, cl_zalloc

Public: Memory Management/cl_malloc

NAME
    cl_malloc

DESCRIPTION
    The cl_malloc function allocates a block of memory.

SYNOPSIS
void*
cl_malloc( 
    IN  const size_t    size );

PARAMETERS
    size
        [in] Size of the requested allocation.

RETURN VALUES
    Pointer to allocated memory if successful.

    NULL otherwise.

NOTES
    Allocated memory follows alignment rules specific to the different 
    environments.

SEE ALSO
    Memory Management, cl_free, cl_zalloc, cl_memset, cl_memclr, cl_memcpy, cl_memcmp

Public: Memory Management/cl_mem_display

NAME
    cl_mem_display

DESCRIPTION
    The cl_mem_display function displays all tracked memory allocations to 
    the applicable debugger.

SYNOPSIS
void
cl_mem_display( void );

RETURN VALUE
    This function does not return a value.

NOTES
    Each tracked memory allocation is displayed along with the file name and 
    line number that allocated it.

    Output is sent to the platform's debugging target, which may be the
    system log file.

SEE ALSO
    Memory Management

Public: Memory Management/cl_memclr

NAME
    cl_memclr

DESCRIPTION
    The cl_memclr function sets every byte in a memory range to zero.

SYNOPSIS
 void
cl_memclr( 
    IN  void* const     p_memory, 
    IN  const size_t    count ;
PARAMETERS
    p_memory 
        [in] Pointer to a memory block.

    count
        [in] Number of bytes to set.

RETURN VALUE
    This function does not return a value.

SEE ALSO
    Memory Management, cl_memset, cl_memcpy, cl_memcmp

Public: Memory Management/cl_memcmp

NAME
    cl_memcmp

DESCRIPTION
    The cl_memcmp function compares two memory buffers.

SYNOPSIS
int32_t
cl_memcmp( 
    IN  const void* const   p_mem,
    IN  const void* const   p_ref,
    IN  const size_t        count );

PARAMETERS
    p_mem 
        [in] Pointer to a memory block being compared.

    p_ref
        [in] Pointer to the reference memory block to compare against.

    count
        [in] Number of bytes to compare. 

RETURN VALUES
    Returns less than zero if p_mem is less than p_ref.

    Returns greater than zero if p_mem is greater than p_ref.

    Returns zero if the two memory regions are the identical.

SEE ALSO
    Memory Management, cl_memset, cl_memclr, cl_memcpy

Public: Memory Management/cl_memcpy

NAME
    cl_memcpy

DESCRIPTION
    The cl_memcpy function copies a given number of bytes from 
    one buffer to another.

SYNOPSIS
void*
cl_memcpy( 
    IN  void* const         p_dest, 
    IN  const void* const   p_src, 
    IN  const size_t        count );

PARAMETERS
    p_dest 
        [in] Pointer to the buffer being copied to. 

    p_src 
        [in] Pointer to the buffer being copied from. 

    count
        [in] Number of bytes to copy from the source buffer to the 
        destination buffer. 

RETURN VALUE
    This function does not return a value.

SEE ALSO
    Memory Management, cl_memset, cl_memclr, cl_memcmp

Public: Memory Management/cl_memset

NAME
    cl_memset

DESCRIPTION
    The cl_memset function sets every byte in a memory range to a given value.

SYNOPSIS
void
cl_memset( 
    IN  void* const     p_memory, 
    IN  const uint8_t   fill,
    IN  const size_t    count );

PARAMETERS
    p_memory 
        [in] Pointer to a memory block.

    fill 
        [in] Byte value with which to fill the memory. 

    count
        [in] Number of bytes to set.

RETURN VALUE
    This function does not return a value.

SEE ALSO
    Memory Management, cl_memclr, cl_memcpy, cl_memcmp

Public: Memory Management/cl_zalloc

NAME
    cl_zalloc

DESCRIPTION
    The cl_zalloc function allocates a block of memory initialized to zero.

SYNOPSIS
void*
cl_zalloc( 
    IN  const size_t    size );

PARAMETERS
    size
        [in] Size of the requested allocation.

RETURN VALUES
    Pointer to allocated memory if successful.

    NULL otherwise.

NOTES
    Allocated memory follows alignment rules specific to the different 
    environments.

SEE ALSO
    Memory Management, cl_free, cl_malloc, cl_memset, cl_memclr, cl_memcpy, cl_memcmp