Wing Commander II
Reconstructed Win32 source (1996)
Loading...
Searching...
No Matches
nearheap.c File Reference

Near heap allocator. More...

#include "game.h"
#include <float.h>

Go to the source code of this file.

Macros

#define NEARHEAP_C

Functions

short MergeAdjacentNearHeapBlocks (int descriptorAddress)
int ReleaseNearHeapBlock (int descriptorAddress)
void PurgeNearHeapBlocks (short flags)
unsigned short InitializeNearHeap (void)
void ShutdownNearHeap (void)
void * AllocateNearHeapBlockFromEnd (int size, short flags)
void * AllocateNearHeapBlockByFlags (int size, short flags)
void FreeNearHeapBlock (void *pointer)
int GetNearHeapBlockSize (void *pointer)

Variables

volatile short g_nNearHeapActive = 0
volatile short g_nNearHeapMaxDescriptors = 0x80
volatile int g_nNearHeapRelocationBytes = 0
volatile int g_nNearArenaSize
volatile int g_1_nNearHeapBase
int g_nNearHeapFirstDescriptor
void *volatile g_1_pNearHeapAllocationPtr

Detailed Description

Near heap allocator.

Definition in file nearheap.c.

Macro Definition Documentation

◆ NEARHEAP_C

#define NEARHEAP_C

Definition at line 6 of file nearheap.c.

Function Documentation

◆ AllocateNearHeapBlockByFlags()

◆ AllocateNearHeapBlockFromEnd()

◆ FreeNearHeapBlock()

◆ GetNearHeapBlockSize()

◆ InitializeNearHeap()

◆ MergeAdjacentNearHeapBlocks()

short MergeAdjacentNearHeapBlocks ( int descriptorAddress)

◆ PurgeNearHeapBlocks()

◆ ReleaseNearHeapBlock()

◆ ShutdownNearHeap()

Variable Documentation

◆ g_1_nNearHeapBase

◆ g_1_pNearHeapAllocationPtr

void* volatile g_1_pNearHeapAllocationPtr

Definition at line 376 of file nearheap.c.

Referenced by InitializeNearHeap(), and ShutdownNearHeap().

◆ g_nNearArenaSize

◆ g_nNearHeapActive

volatile short g_nNearHeapActive = 0

Definition at line 9 of file nearheap.c.

Referenced by InitializeNearHeap(), PurgeNearHeapBlocks(), and ShutdownNearHeap().

◆ g_nNearHeapFirstDescriptor

◆ g_nNearHeapMaxDescriptors

volatile short g_nNearHeapMaxDescriptors = 0x80

◆ g_nNearHeapRelocationBytes

volatile int g_nNearHeapRelocationBytes = 0

Definition at line 11 of file nearheap.c.

Referenced by InitializeNearHeap(), and ShutdownNearHeap().