pgMemMgr.h File Reference

#include "CPUDEFS.H"
#include "pgMTraps.h"
#include "PGSETJMP.H"

Include dependency graph for pgMemMgr.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pgm_globals
struct  mem_rec

Defines

#define BIG_CHECKSUM_BYTE   0xAA
#define CHECKSUM_SIZE   sizeof(long)
#define NO_DEBUG   0x0000
#define BAD_REF_CHECK   0x0001
#define OVERWRITE_CHECK   0x0002
#define ACCESS_CTR_CHECK   0x0004
#define NOT_DISPOSED_CHECK   0x0008
#define ALL_MEMORY_CHECK   0x0010
#define FILL_ONES_ENABLE   0x0020
#define ALL_ONES_ENABLE   0x0040
#define RANGE_CHECK   0x0080
#define CURSOR_DEBUG   0x0100
#define DEF_DEBUG_BITS   (BAD_REF_CHECK | OVERWRITE_CHECK | ACCESS_CTR_CHECK | NOT_DISPOSED_CHECK | RANGE_CHECK)
#define MINIMUM_ID   1
#define USE_ALL_RECS   -1
#define REASONABLE_REC_SIZE   0x00200000
#define PURGE_VALUE_MASK   0x00FF
#define PURGED_FLAG   0x8000
#define PARTIAL_LOAD_FLAG   0x4000
#define NO_DATA_SAVE_FLAG   0x2000
#define PURGE_LOCK_FLAG   0x1000
#define CLEAR_PURGED_FLAG   0x7FFF
#define NO_PURGING_STATUS   0x00FF
#define PURGE_NO_CHANGE   0xFFFF
#define PURGE_THRESHOLD   0x00010000
#define PURGE_WORTH_IT   0x00000064
#define CHECKSUM_BYTE1   0x12
#define CHECKSUM_BYTE2   0x34
#define CHECKSUM_BYTE3   0x56
#define CHECKSUM_BYTE4   0x78
#define CHECKSUM_SIG   0x7777
#define NON_APP_SIZE   sizeof(mem_rec)
#define BEGIN_TIMER_DEBUG(msg)
#define END_TIMER_DEBUG
#define MEM_NULL   0L
#define MemoryAlloc(globals, rec_size, num_recs, extend_size)   pgAllocateNewRef((globals),rec_size,num_recs,extend_size,FALSE)
#define MemoryAllocClear(globals, rec_size, num_recs, extend_size)   pgAllocateNewRef((globals),rec_size,num_recs,extend_size,TRUE)
#define PString2Memory(mem_globals, string)   Bytes2Memory (mem_globals, (pg_bits8_ptr)string, sizeof(pg_char), string[0] + 1)
#define CString2Memory(mem_globals, string)   Bytes2Memory (mem_globals, (pg_bits8_ptr)string, sizeof(pg_char), pgCStrLength(string) + 1)
#define pgSourceDebugBreak(offending_ref, debug_str)

Typedefs

typedef unsigned long memory_ref
typedef memory_ref PG_FAR * memory_ref_ptr
typedef long PG_FAR * available_ptr
typedef pg_handle PG_FAR * master_list_ptr
typedef unsigned long what_ref
typedef pgm_globals_ptr mem_globals
typedef pgm_globals_ptr short verb
typedef memory_ref dont_free
typedef memory_ref long desired_free
typedef mem_rec mem_rec
typedef mem_rec PG_FAR * mem_rec_ptr

Enumerations

enum  { purge_init, purge_memory, unpurge_memory, dispose_purge }

Functions

typedef PG_FN_PASCAL (void, mem_debug_proc)(pg_error message
typedef PG_FN_PASCAL (pg_error, purge_proc)(memory_ref ref_to_purge
typedef PG_FN_PASCAL (long, free_memory_proc)(pgm_globals_ptr mem_globals
 PG_PASCAL (void) pgMemStartup(pgm_globals_ptr mem_globals
 PG_PASCAL (memory_ref) DisposeMemory(memory_ref ref)
 PG_PASCAL (void PG_FAR *) UseMemory(memory_ref ref)
 PG_PASCAL (long) GetAllMemorySize(pgm_globals_ptr mem_globals
 PG_PASCAL (pg_error) MemoryPurge(pgm_globals_ptr globals
 PG_PASCAL (short) GetMemoryRecSize(memory_ref ref)
 PG_PASCAL (pgm_globals_ptr) GetGlobalsFromRef(memory_ref ref)
 PG_PASCAL (pg_handle) DetachMemory(memory_ref ref)
 PG_PASCAL (pg_short_t) GetMemoryPurge(memory_ref ref)
 PG_PASCAL (char PG_FAR *) UseMemoryToCStr(memory_ref ref)
 PG_PASCAL (pg_char_ptr) UseMemoryToPStr(memory_ref ref)

Variables

long max_memory
pg_short_t rec_size
pg_short_t long num_recs
pg_short_t long short extend_size
pg_short_t long short long mem_id
pg_short_t rec_size
pg_short_t long num_recs
pg_short_t long short extend_size
pg_short_t long short long mem_id
long mem_id
memory_ref target_ref
long wanted_rec
long long seq_recs_used
long long pg_boolean first_use
long wanted_rec
long void PG_FAR * record
long wanted_size
pg_short_t new_rec_size
pg_short_t short extend_size
long memory_id
long memory_id
long memory_id
long memory_id
long pg_boolean return_byte_size
long offset
long long insert_size
long append_size
long pg_boolean zero_fill
long offset
long long delete_size
short purge_priority
short pg_boolean no_data_save
pg_handle base_ref
long minimum_amount
long memory_ref mask_ref
purge_proc purge_function
purge_proc long ref_con
long mem_id
long orig_id
long long new_id
long num_recs
pg_short_t rec_size
pg_short_t long num_recs
pg_short_t long short extend_size
pg_short_t long short short zero_fill
long memory_id
long memory_id
long offset
long long byte_size
long long long block_size
long offset
long long byte_size
long long long block_size
void PG_FAR * dest
void PG_FAR long block_size
pgm_globals_ptr mem_globals
pgm_globals_ptr short verb
memory_ref dont_free
memory_ref long desired_free
long block_size
long char value
memory_ref ref2
const pg_bits8_ptr data
const pg_bits8_ptr short char_size
const pg_bits8_ptr short long length


Define Documentation

#define ACCESS_CTR_CHECK   0x0004
 

Definition at line 47 of file pgMemMgr.h.

#define ALL_MEMORY_CHECK   0x0010
 

Definition at line 49 of file pgMemMgr.h.

#define ALL_ONES_ENABLE   0x0040
 

Definition at line 51 of file pgMemMgr.h.

#define BAD_REF_CHECK   0x0001
 

Definition at line 45 of file pgMemMgr.h.

#define BEGIN_TIMER_DEBUG msg   ) 
 

Value:

{   unsigned long   debug_ticks = TickCount();  \
            char     num[14];   \
            num[13] = msg;

Definition at line 92 of file pgMemMgr.h.

#define BIG_CHECKSUM_BYTE   0xAA
 

Definition at line 34 of file pgMemMgr.h.

#define CHECKSUM_BYTE1   0x12
 

Definition at line 77 of file pgMemMgr.h.

#define CHECKSUM_BYTE2   0x34
 

Definition at line 78 of file pgMemMgr.h.

#define CHECKSUM_BYTE3   0x56
 

Definition at line 79 of file pgMemMgr.h.

#define CHECKSUM_BYTE4   0x78
 

Definition at line 80 of file pgMemMgr.h.

#define CHECKSUM_SIG   0x7777
 

Definition at line 82 of file pgMemMgr.h.

#define CHECKSUM_SIZE   sizeof(long)
 

Definition at line 39 of file pgMemMgr.h.

#define CLEAR_PURGED_FLAG   0x7FFF
 

Definition at line 67 of file pgMemMgr.h.

#define CString2Memory mem_globals,
string   )     Bytes2Memory (mem_globals, (pg_bits8_ptr)string, sizeof(pg_char), pgCStrLength(string) + 1)
 

Definition at line 313 of file pgMemMgr.h.

#define CURSOR_DEBUG   0x0100
 

Definition at line 53 of file pgMemMgr.h.

#define DEF_DEBUG_BITS   (BAD_REF_CHECK | OVERWRITE_CHECK | ACCESS_CTR_CHECK | NOT_DISPOSED_CHECK | RANGE_CHECK)
 

Definition at line 55 of file pgMemMgr.h.

#define END_TIMER_DEBUG
 

Value:

NumToString(TickCount() - debug_ticks, (StringPtr)num); \
            ++num[0];   \
            num[num[0]] = num[13];  \
            DebugStr((StringPtr)num);   }

Definition at line 97 of file pgMemMgr.h.

#define FILL_ONES_ENABLE   0x0020
 

Definition at line 50 of file pgMemMgr.h.

#define MEM_NULL   0L
 

Definition at line 105 of file pgMemMgr.h.

Referenced by setupundo(), unpackwordsolutionenginefile(), wpbeginprint(), wpcleartabs(), wpdrawtext(), wpexportscrap(), wpframeselection(), wpgetselrect(), wpgetseltexthandle(), wpmeasuretext(), wpnewbuffer(), wpnewpg(), wpsetbufferrect(), wpsetupwindow(), and wpupdate().

#define MemoryAlloc globals,
rec_size,
num_recs,
extend_size   )     pgAllocateNewRef((globals),rec_size,num_recs,extend_size,FALSE)
 

Definition at line 288 of file pgMemMgr.h.

Referenced by wpcleartabs(), wpinserttexthandle(), wppacktext(), and wpunpacktext().

#define MemoryAllocClear globals,
rec_size,
num_recs,
extend_size   )     pgAllocateNewRef((globals),rec_size,num_recs,extend_size,TRUE)
 

Definition at line 289 of file pgMemMgr.h.

#define MINIMUM_ID   1
 

Definition at line 57 of file pgMemMgr.h.

#define NO_DATA_SAVE_FLAG   0x2000
 

Definition at line 64 of file pgMemMgr.h.

#define NO_DEBUG   0x0000
 

Definition at line 44 of file pgMemMgr.h.

#define NO_PURGING_STATUS   0x00FF
 

Definition at line 69 of file pgMemMgr.h.

#define NON_APP_SIZE   sizeof(mem_rec)
 

Definition at line 87 of file pgMemMgr.h.

#define NOT_DISPOSED_CHECK   0x0008
 

Definition at line 48 of file pgMemMgr.h.

#define OVERWRITE_CHECK   0x0002
 

Definition at line 46 of file pgMemMgr.h.

#define PARTIAL_LOAD_FLAG   0x4000
 

Definition at line 63 of file pgMemMgr.h.

#define pgSourceDebugBreak offending_ref,
debug_str   ) 
 

Definition at line 324 of file pgMemMgr.h.

#define PString2Memory mem_globals,
string   )     Bytes2Memory (mem_globals, (pg_bits8_ptr)string, sizeof(pg_char), string[0] + 1)
 

Definition at line 312 of file pgMemMgr.h.

#define PURGE_LOCK_FLAG   0x1000
 

Definition at line 65 of file pgMemMgr.h.

#define PURGE_NO_CHANGE   0xFFFF
 

Definition at line 70 of file pgMemMgr.h.

#define PURGE_THRESHOLD   0x00010000
 

Definition at line 72 of file pgMemMgr.h.

#define PURGE_VALUE_MASK   0x00FF
 

Definition at line 61 of file pgMemMgr.h.

#define PURGE_WORTH_IT   0x00000064
 

Definition at line 73 of file pgMemMgr.h.

#define PURGED_FLAG   0x8000
 

Definition at line 62 of file pgMemMgr.h.

#define RANGE_CHECK   0x0080
 

Definition at line 52 of file pgMemMgr.h.

#define REASONABLE_REC_SIZE   0x00200000
 

Definition at line 60 of file pgMemMgr.h.

#define USE_ALL_RECS   -1
 

Definition at line 59 of file pgMemMgr.h.


Typedef Documentation

typedef long PG_FAR* available_ptr
 

Definition at line 110 of file pgMemMgr.h.

typedef memory_ref long desired_free
 

Definition at line 127 of file pgMemMgr.h.

typedef memory_ref dont_free
 

Definition at line 127 of file pgMemMgr.h.

typedef pg_handle PG_FAR* master_list_ptr
 

Definition at line 111 of file pgMemMgr.h.

typedef pgm_globals_ptr mem_globals
 

Definition at line 126 of file pgMemMgr.h.

typedef struct mem_rec mem_rec
 

Definition at line 189 of file pgMemMgr.h.

typedef mem_rec PG_FAR* mem_rec_ptr
 

Definition at line 190 of file pgMemMgr.h.

typedef unsigned long memory_ref
 

Definition at line 107 of file pgMemMgr.h.

typedef memory_ref PG_FAR* memory_ref_ptr
 

Definition at line 108 of file pgMemMgr.h.

typedef pgm_globals_ptr short verb
 

Definition at line 126 of file pgMemMgr.h.

typedef unsigned long what_ref
 

Definition at line 125 of file pgMemMgr.h.


Enumeration Type Documentation

anonymous enum
 

Enumerator:
purge_init 
purge_memory 
unpurge_memory 
dispose_purge 

Definition at line 115 of file pgMemMgr.h.


Function Documentation

typedef PG_FN_PASCAL long  ,
free_memory_proc 
 

typedef PG_FN_PASCAL pg_error  ,
purge_proc 
 

typedef PG_FN_PASCAL void  ,
mem_debug_proc 
 

PG_PASCAL pg_char_ptr   ) 
 

PG_PASCAL char PG_FAR *   ) 
 

PG_PASCAL pg_short_t   ) 
 

PG_PASCAL pg_handle   ) 
 

PG_PASCAL pgm_globals_ptr   ) 
 

PG_PASCAL short   ) 
 

PG_PASCAL pg_error   ) 
 

PG_PASCAL long   ) 
 

PG_PASCAL void PG_FAR *   ) 
 

PG_PASCAL memory_ref   ) 
 

PG_PASCAL void   ) 
 


Variable Documentation

long append_size
 

Definition at line 226 of file pgMemMgr.h.

pg_handle base_ref
 

Definition at line 230 of file pgMemMgr.h.

long block_size
 

Definition at line 267 of file pgMemMgr.h.

void PG_FAR long block_size
 

Definition at line 258 of file pgMemMgr.h.

long long long block_size
 

Definition at line 257 of file pgMemMgr.h.

long long long block_size
 

Definition at line 256 of file pgMemMgr.h.

long long byte_size
 

Definition at line 257 of file pgMemMgr.h.

long long byte_size
 

Definition at line 256 of file pgMemMgr.h.

const pg_bits8_ptr short char_size
 

Definition at line 307 of file pgMemMgr.h.

const pg_bits8_ptr data
 

Definition at line 307 of file pgMemMgr.h.

long long delete_size
 

Definition at line 227 of file pgMemMgr.h.

memory_ref long desired_free
 

Definition at line 261 of file pgMemMgr.h.

void PG_FAR* dest
 

Definition at line 258 of file pgMemMgr.h.

memory_ref dont_free
 

Definition at line 261 of file pgMemMgr.h.

pg_short_t long short extend_size
 

Definition at line 249 of file pgMemMgr.h.

pg_short_t short extend_size
 

Definition at line 219 of file pgMemMgr.h.

pg_short_t long short extend_size
 

Definition at line 207 of file pgMemMgr.h.

pg_short_t long short extend_size
 

Definition at line 205 of file pgMemMgr.h.

long long pg_boolean first_use
 

Definition at line 213 of file pgMemMgr.h.

long long insert_size
 

Definition at line 225 of file pgMemMgr.h.

const pg_bits8_ptr short long length
 

Definition at line 307 of file pgMemMgr.h.

long memory_ref mask_ref
 

Definition at line 232 of file pgMemMgr.h.

long max_memory
 

Definition at line 200 of file pgMemMgr.h.

pgm_globals_ptr mem_globals
 

Definition at line 260 of file pgMemMgr.h.

long mem_id
 

Definition at line 243 of file pgMemMgr.h.

long mem_id
 

Definition at line 209 of file pgMemMgr.h.

pg_short_t long short long mem_id
 

Definition at line 207 of file pgMemMgr.h.

pg_short_t long short long mem_id
 

Definition at line 205 of file pgMemMgr.h.

long memory_id
 

Definition at line 254 of file pgMemMgr.h.

long memory_id
 

Definition at line 252 of file pgMemMgr.h.

long memory_id
 

Definition at line 223 of file pgMemMgr.h.

long memory_id
 

Definition at line 222 of file pgMemMgr.h.

long memory_id
 

Definition at line 221 of file pgMemMgr.h.

long memory_id
 

Definition at line 220 of file pgMemMgr.h.

long minimum_amount
 

Definition at line 232 of file pgMemMgr.h.

long long new_id
 

Definition at line 247 of file pgMemMgr.h.

pg_short_t new_rec_size
 

Definition at line 219 of file pgMemMgr.h.

short pg_boolean no_data_save
 

Definition at line 228 of file pgMemMgr.h.

pg_short_t long num_recs
 

Definition at line 249 of file pgMemMgr.h.

long num_recs
 

Definition at line 248 of file pgMemMgr.h.

pg_short_t long num_recs
 

Definition at line 207 of file pgMemMgr.h.

pg_short_t long num_recs
 

Definition at line 205 of file pgMemMgr.h.

long offset
 

Definition at line 257 of file pgMemMgr.h.

long offset
 

Definition at line 256 of file pgMemMgr.h.

long offset
 

Definition at line 227 of file pgMemMgr.h.

long offset
 

Definition at line 225 of file pgMemMgr.h.

long orig_id
 

Definition at line 247 of file pgMemMgr.h.

purge_proc purge_function
 

Definition at line 234 of file pgMemMgr.h.

short purge_priority
 

Definition at line 228 of file pgMemMgr.h.

pg_short_t rec_size
 

Definition at line 249 of file pgMemMgr.h.

pg_short_t rec_size
 

Definition at line 207 of file pgMemMgr.h.

pg_short_t rec_size
 

Definition at line 205 of file pgMemMgr.h.

long void PG_FAR* record
 

Definition at line 215 of file pgMemMgr.h.

memory_ref ref2
 

Definition at line 306 of file pgMemMgr.h.

purge_proc long ref_con
 

Definition at line 234 of file pgMemMgr.h.

long pg_boolean return_byte_size
 

Definition at line 223 of file pgMemMgr.h.

long long seq_recs_used
 

Definition at line 213 of file pgMemMgr.h.

memory_ref target_ref
 

Definition at line 210 of file pgMemMgr.h.

long char value
 

Definition at line 267 of file pgMemMgr.h.

pgm_globals_ptr short verb
 

Definition at line 260 of file pgMemMgr.h.

long wanted_rec
 

Definition at line 215 of file pgMemMgr.h.

long wanted_rec
 

Definition at line 213 of file pgMemMgr.h.

long wanted_size
 

Definition at line 218 of file pgMemMgr.h.

pg_short_t long short short zero_fill
 

Definition at line 249 of file pgMemMgr.h.

long pg_boolean zero_fill
 

Definition at line 226 of file pgMemMgr.h.


Generated on Fri Jun 9 22:24:32 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6