home *** CD-ROM | disk | FTP | other *** search
- {
- ════════════════════════════════════════════════════════════════════════════
-
- Visionix Memory Management Unit (VMEM)
- Copyright 1991,92,93 Visionix
- ALL RIGHTS RESERVED
-
- ────────────────────────────────────────────────────────────────────────────
-
- Revision history in reverse chronological order:
-
- Initials Date Comment
- ──────── ──────── ────────────────────────────────────────────────────────
-
- mep 02/11/93 Cleaned up code for beta release
-
- jrt 02/08/93 Sync with beta 0.12 release
-
- jrt 12/07/92 Sync with beta 0.11 release
-
- jrt 11/21/92 Sync with beta 0.08
-
- jrt 08/01/92 First logged revision.
-
- ════════════════════════════════════════════════════════════════════════════
- }
-
- Unit VMem;
-
-
- Uses
-
- VTypes;
-
- {──────────────────────────────────────────────────────────────────────────────}
-
- Const
-
- allocZERO = $01;
-
- Type
-
- TMemHeader = RECORD
-
- Locks : LONGINT;
- Size : LONGINT;
- Ptr : Pointer;
-
- END;
-
- PMemHeader = ^TMemHeader;
-
- {──────────────────────────────────────────────────────────────────────────────}
-
- Function VMemAlloc( Flags : WORD;
- Size : LONGINT ):THandle;
-
- { Allocates a memory handle. }
- { }
- { Flags Allocation control flags }
- { allocZERO zero out allocated memory. }
- { }
- { [RETURNS] Memory Handle, }
- { 0 if error. }
-
-
- Function VMemLock( MemHandle : THandle ):Pointer;
-
- { Locks down the memory associated with a memory handle, and }
- { returns a pointer to it. }
- { }
- { MemHandle Previously allocated memory handle. }
- { }
- { [RETURNS] Pointer to memory, }
- { NIL if error. }
-
-
- Procedure VMemUnlock( MemHandle : THandle );
-
- { Unlocks the memory associated with a memory handle, invaliding }
- { any pointer to the memory previously obtained via VMemLock. }
- { }
- { MemHandle Previously allocated memory handle. }
- { }
-
-
- Procedure VMemFree( MemHandle : THandle );
-
- { VMemFree frees a memory handle and the memory associated with }
- { it. }
- { }
- { MemHandle Previously allocated memory handle. }
-
- {──────────────────────────────────────────────────────────────────────────────}
-
-