CatPrint Funct StrCat(). See StrPrintJoin(). MemCmp Funct To unit vect MemCpy Funct Compare chunk of memory. MemCpy64 Funct Compare chunk of memory. MemSet Funct Copy chunk of memory. Only goes fwd. MemSetI64 Funct Copy 64-bit blocks of memory. Only goes fwd. MemSetU16 Funct Set chunk of U8s to value. MemSetU32 Funct Set chunk of I64s to value. MemSetU8 Funct Set chunk of U16s to value.
Memory ACAlloc Funct Alloc and set to zero memory in Adam's heap. AMAlloc Funct Alloc memory in Adam's heap. AMAllocIdent Funct Alloc in Adam's heap, ident copy of heap node. AStrNew Funct Alloc copy of string in Adam's heap.
Memory/Adam Heap BIOSTotalMem Funct {
Memory/BIOS The word Pag refers to an arbitrilly created MEM_PAG_SIZE unit of heap allocation. TempleOS does not alter the CPU page tables after setting them up at boot in SYS_INIT_PAGE_TABLES, so the CPU hardware page size is rarely important. BlkPoolAdd Funct Add mem to BlkPool. BlkPoolInit Funct Make mem chunk into a BlkPool. CBlkPool Class class CBlkPool MemPagAlloc Funct { MemPagFree Funct Return non-task pags to BlkPool. Scale2Mem Funct Helps pick DiskCache and RAMDisk sizes. sys_code_bp GlbVar _extern SYS_STAFF_MODE_FLAG U8 sys_staff_mode_flag; sys_data_bp GlbVar _extern SYS_VAR_INIT_FLAG U8 sys_var_init_flag;
Memory/BlkPool CLFlush Funct eXchange U32s. sys_cache_line_widthGlbVar _extern SYS_GDT CGDT sys_gdt;
Memory/Cache Recompile the kernel with _CFG_HEAP_DBG=TRUE if you want more heap debugging. You are on your own. HeapCtrlWalk Funct Check integrity of HeapCtrl. HeapLog Funct Turn on. Collect data. Call HeapLogAddrRep() or HeapLogSizeRep(). HeapLogAddrRep Funct Call HeapLog() first and collect data. HeapLogSizeRep Funct Call HeapLog() first and collect data. HeapRep Funct Report status of task's heap. HeapWalk Funct Check integrity of task's heaps. IsInHeap Funct Check addr if in task's heaps. IsInHeapCtrl Funct Check addr if in HeapCtrl.
Memory/Debugging CAlloc Funct Accepts a CTask or CHeapCtrl. NULL allocs off current task's heap. CAllocAligned Funct Only powers of two alignment. This is awful. Free Funct Free MAlloc()ed memory chunk. MAlloc Funct Alloc memory chunk. MAllocAligned Funct Only powers of two alignment. This is awful. MAllocIdent Funct Accepts a CTask or CHeapCtrl. NULL allocs off current task's heap. MHeapCtrl Funct CHeapCtrl of object. MSize Funct Size of heap object. MSize2 Funct Internal size of heap object. StrNew Funct Accepts a CTask or CHeapCtrl. NULL allocs off current task's heap.
Memory/Heap CHeapCtrl Class class CHeapCtrl HeapCtrlDel Funct Free all blks alloced to a HeapCtrl. HeapCtrlInit Funct See HeapLog() for an example. HeapCtrlWalk Funct Check integrity of HeapCtrl. IsInHeapCtrl Funct Check addr if in HeapCtrl.
Memory/HeapCtrl Hypervisor Funct { MOUSE_BAUD GlbVar I64 MOUSE_BAUD=1200; MOUSE_COM GlbVar U8 MOUSE_COM=0; MemBIOSRep Funct Report the memory ranges reported by the BIOS at boot. MemPageRep Funct Page Table Report. MemRep Funct Memory usage report. PCIDevFind Funct return first device matching class & subcode, vendor & device id, or a specific device. PCILookUpDev Funct { PciFindByID Funct { ProbeSerialMouse Funct {
Memory/Info CDevGlbls Class class CDevGlbls CSysFixedArea Class class CSysFixedArea InvlPg Funct CPU's Cache line width. Mem32DevAlloc Funct Alloc 32-bit addr space for device. (Doesn't work.) Not used. Mem32DevFree Funct Free 32-bit device address space. Mem64DevAlloc Funct Alloc 64-bit addr space for device. Mem64DevFree Funct Free 64-bit device address space. MemPageTable Funct Point to page table entry for addr. dev GlbVar CDevGlbls dev; mem_page_size GlbVar I64 sys_cache_line_width; //CPU's Cache line width.
Memory/Page Tables Seg2Linear Funct Convert 32-bit segmented far pointer to linear address. Modify in place.
Memory/Segmentation HeapRep Funct Report status of task's heap. HeapWalk Funct Check integrity of task's heaps. IsInHeap Funct Check addr if in task's heaps. TaskMemAlloced Funct Count of bytes alloced to a task, used+unused. TaskMemUsed Funct Count of bytes alloced to a task and in use.
Memory/Task