src/os/jumbo_pbm.c File Reference

Jumbo Packet Buffer Manager. Ths file has functions which handle dynamic memory management (heap allocations) for packet buffer sizes greater than 3K. These functions are typically called for buffer management of jumbo frames greater than 3K size. More...


Data Structures

struct  JUMBO_MEMORYBLOCK
 This structure defines the Jumbo memory block structure. More...
struct  JUMBO_PITENTRY
 This structure defines the Page Information entry. More...

Functions

int _jumbo_mmInit ()
void * jumbo_mmAlloc (uint Size)
void jumbo_mmFree (void *p)
void _jumbo_mmCheck (uint CallMode, int(*pPrn)(const char *,...))


Detailed Description

Jumbo Packet Buffer Manager. Ths file has functions which handle dynamic memory management (heap allocations) for packet buffer sizes greater than 3K. These functions are typically called for buffer management of jumbo frames greater than 3K size.

NOTE: (C) Copyright 2008, Texas Instruments, Inc.

Function Documentation

void _jumbo_mmCheck ( uint  CallMode,
int(*)(const char *,...)  pPrn 
)

Description
This function iterates through the PIT table and dumps the current memory usage stats according to the arguments specified.

Parameters:
[in] CallMode This argument specifies the type of stats / operation that needs to be performed by this function. The 3 supported call modes are: MMCHECK_MAP : Map out allocated memory, but don't dump ID's MMCHECK_DUMP : Dump allocated block ID's MMCHECK_SHUTDOWN : Dump allocated block's & free
[in] pPrn Callback function pointer to be notified.
Return values:
None. 

int _jumbo_mmInit (  ) 

Description
This function initializes the jumbo frame memory system.

Parameters:
[in] None 
Return values:
Always returns 1 to indicate success.

void* jumbo_mmAlloc ( uint  Size  ) 

Description
This function allocates the required memory size from jumbo memory area.

Parameters:
[in] Size Page Index in the Page Info Table.
Return values:
Returns the pointer to allocated memory block.

void jumbo_mmFree ( void *  p  ) 

Description
This function frees the memory pointed to by the arguments to it.

Parameters:
[in] p Pointer to the memory block that is to be freed.
Return values:
None. 


Copyright 2009, Texas Instruments Incorporated