webengine/wmlengine/src/utils/include/nwx_memseg.h
branchRCL_3
changeset 49 919f36ff910f
parent 0 dd21522fd290
equal deleted inserted replaced
48:79859ed3eea9 49:919f36ff910f
       
     1 /*
       
     2 * Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 /***************************************************************************
       
    20 **   File: nwx_memseg.h
       
    21 **   Purpose:  Provides the interface to the memory segment management
       
    22 **************************************************************************/
       
    23 
       
    24 #ifndef NWX_MEMSEG_H
       
    25 #define NWX_MEMSEG_H
       
    26 
       
    27 #ifdef __cplusplus
       
    28 extern "C" {
       
    29 #endif
       
    30 
       
    31 /*
       
    32 ** Includes
       
    33 */
       
    34 
       
    35 #include "nwx_defs.h"
       
    36 
       
    37 /*
       
    38 ** Definitions
       
    39 */
       
    40 #define NW_MEM_SEGMENT_INVALID   -1
       
    41 #define NW_MEM_SEGMENT_MANUAL     0
       
    42 #define NW_MEM_SEGMENT_LAST       1
       
    43 
       
    44 /*
       
    45 ** Type Definitions
       
    46 */ 
       
    47 
       
    48 typedef NW_Int32  NW_Mem_Segment_Id_t;
       
    49 
       
    50 /*
       
    51 ** Global Function Declarations - Memory Segment
       
    52 */
       
    53 
       
    54 /* Create a new memory segment */
       
    55 NW_Mem_Segment_Id_t NW_Mem_Segment_New(void);
       
    56 
       
    57 /* Free a memory segment and all the allocations made from it */
       
    58 void NW_Mem_Segment_Free(const NW_Mem_Segment_Id_t sid);
       
    59 
       
    60 /* Allocate memory from an existing segment */
       
    61 void* NW_Mem_Segment_Malloc(const NW_Uint32  size, const NW_Mem_Segment_Id_t sid);
       
    62 
       
    63 #ifdef __cplusplus
       
    64 } /* extern "C" */
       
    65 #endif
       
    66 
       
    67 #endif  /* NWX_MEMSEG_H */