📄 gmalloc.htm
字号:
<html>
<head>
<title>StrongForth.f Memory-Allocation Glossary</title>
</head>
<body>
<h1>StrongForth.f Memory-Allocation Glossary</h1>
<hr><p><pre><b>ALLOCATE ( UNSIGNED -- ADDRESS SIGNED )</b></pre></p>
<p>Allocate <kbd>UNSIGNED</kbd> address units of contiguous memory space.
The initial content of the allocated memory space is undefined. If the allocation
succeeds, <kbd>ADDRESS</kbd> is the aligned starting address of the
allocated memory space and <kbd>SIGNED</kbd> is zero. If the operation fails,
<kbd>ADDRESS</kbd> does not represent a valid address and
<kbd>SIGNED</kbd> is the I/O result code.</p>
<hr><p><pre><b>CALLOCATE ( UNSIGNED -- CADDRESS SIGNED )</b></pre></p>
<p>Allocate <kbd>UNSIGNED</kbd> address units of contiguous memory space.
The initial content of the allocated memory space is undefined. If the allocation
succeeds, <kbd>CADDRESS</kbd> is the aligned starting address of the
allocated memory space and <kbd>SIGNED</kbd> is zero. If the operation fails,
<kbd>CADDRESS</kbd> does not represent a valid address and
<kbd>SIGNED</kbd> is the I/O result code.</p>
<hr><p><pre><b>FREE ( ADDRESS -- SIGNED )</b></pre></p>
<p>Return the contiguous memory space starting at
<kbd>ADDRESS</kbd> to the system for later allocation.
<kbd>ADDRESS</kbd> shall indicate a memory space that
was previously obtained by <kbd>ALLOCATE</kbd>, <kbd>CALLOCATE</kbd> or <kbd>RESIZE</kbd>.
If the operation succeeds, or <kbd>ADDRESS</kbd> is null,
<kbd>SIGNED</kbd> is zero.
If the operation fails, <kbd>SIGNED</kbd> is the I/O result code.</p>
<hr><p><pre><b>RESIZE ( ADDRESS UNSIGNED -- 1ST SIGNED )</b></pre></p>
<p>Change the allocation of the contiguous memory space starting at the
address <kbd>ADDRESS</kbd>, previously allocated by <kbd>ALLOCATE</kbd>, <kbd>CALLOCATE</kbd>
or <kbd>RESIZE</kbd>, to <kbd>UNSIGNED</kbd> address units.
<kbd>UNSIGNED</kbd> may be either larger or smaller than the current size
of the memory space. If the operation succeeds, <kbd>1ST</kbd> is the
aligned starting address of <kbd>UNSIGNED</kbd> address units of allocated
memory and <kbd>SIGNED</kbd> is zero. <kbd>1ST</kbd> may be, but need not be,
the same as <kbd>ADDRESS</kbd>. If they are not the same, the values
contained in the memory space at <kbd>ADDRESS</kbd> are copied to
<kbd>1ST</kbd>, up to the minimum size of either of the two memory spaces.
If they are the same, the values contained in the memory space are preserved.
If <kbd>1ST</kbd> is not the same as <kbd>ADDRESS</kbd>, the memory
space at <kbd>ADDRESS</kbd> is returned to the system according to the
operation of <kbd>FREE</kbd>.</p>
<p>If the operation fails, <kbd>1ST</kbd> equals <kbd>ADDRESS</kbd>,
the memory space at <kbd>ADDRESS</kbd> is unaffected, and
<kbd>SIGNED</kbd> is the I/O result code.</p>
<hr>
<p><a href="http://home.vrweb.de/s.becher/">Dr. Stephan Becher</a> - January 30th, 2009</p></body>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -