コード例 #1
0
ファイル: pm.c プロジェクト: BackupTheBerlios/uuu
/****************************************************************************
REMARKS:
Initialise the PM library.
****************************************************************************/
void PMAPI PM_init(void)
{
    /* Override the default memory allocators for all SNAP drivers
     * loaded in SDDHELP/PMHELP. We do this so that we can ensure all memory
     * dynamically allocated by SNAP drivers and internal C runtime
     * library functions are shared memory blocks that all processes
     * connecting to SDDHELP can see.
     */
    PM_useLocalMalloc(NTDRV_malloc,NTDRV_calloc,NTDRV_realloc,NTDRV_free);

    /* Initialiase the MTRR module */
    MTRR_init();
}
コード例 #2
0
ファイル: pm.c プロジェクト: kendallb/scitech-mgl
/****************************************************************************
REMARKS:
Initialise the PM library.
****************************************************************************/
void PMAPI PM_init(void)
{
    static ibool    inited = false;

    /* Exit if we are already inited */
    if (inited)
        return;

    /* Override the default memory allocators for all SNAP drivers
     * loaded in SDDHELP/PMHELP. We do this so that we can ensure all memory
     * dynamically allocated by SNAP drivers and internal C runtime
     * library functions are shared memory blocks that all processes
     * connecting to SDDHELP can see.
     */
    PM_useLocalMalloc(NTDRV_malloc,NTDRV_calloc,NTDRV_realloc,NTDRV_free);

    /* Initialiase the MTRR module */
    MTRR_init();

    /* Map the first Mb of physical memory into lowMem */
    if ((lowMem = PM_mapPhysicalAddr(0,0xFFFFF,true)) == NULL)
        PM_fatalError("Unable to map first Mb physical memory!");
    inited = true;
}