Differences
This shows you the differences between two versions of the page.
| en:docs:win16:api:kernel:localhandledelta [2023/05/01 14:24] – created prokushev | en:docs:win16:api:kernel:localhandledelta [2026/03/04 07:08] (current) – prokushev | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| {{page> | {{page> | ||
| - | ====== | + | ====== |
| + | ==== Brief ==== | ||
| + | Sets the number of handle table entries to be allocated when the local heap manager runs out of handle table entries for local moveable objects. | ||
| - | ===== Brief ===== | + | ==== Syntax |
| + | <code c>short WINAPI LocalHandleDelta( | ||
| + | short nNewDelta | ||
| + | );</ | ||
| - | ===== Syntax ===== | + | ==== Parameters |
| - | ===== Parameters ===== | + | nNewDelta – A short integer value specifying the number of handle table entries to be allocated (the " |
| - | ===== Return | + | ==== Return |
| + | Returns the current handle delta (after applying any change). | ||
| - | ===== Notes ===== | + | ==== Notes ==== |
| - | ===== Example Code ===== | + | The local heap manager maintains a handle table for moveable objects. When the table becomes full, it allocates new entries in blocks; the size of this block is the handle delta. |
| + | This function allows an application to control the granularity of handle table expansion. | ||
| + | |||
| + | A larger delta reduces the frequency of expansions but consumes more memory; a smaller delta saves memory but may lead to more frequent expansions. | ||
| + | |||
| + | Used for fine‑tuning performance in applications that manipulate many moveable objects. | ||
| + | |||
| + | ==== Example Code ==== | ||
| ==== C Binding ==== | ==== C Binding ==== | ||
| + | <code c>// Get current delta | ||
| + | short currentDelta = LocalHandleDelta(0); | ||
| + | // Set new delta to 16 entries | ||
| + | short oldDelta = LocalHandleDelta(16);</ | ||
| ==== MASM Binding ==== | ==== MASM Binding ==== | ||
| + | <code asm>; AX = new delta (0 to query) | ||
| + | push ax | ||
| + | call LocalHandleDelta | ||
| + | ; Returns AX = current (or new) delta</ | ||
| + | |||
| + | ==== See also ==== | ||
| + | |||
| + | * [[LocalAlloc]] | ||
| + | * [[LocalReAlloc]] | ||
| - | ===== See also ===== | ||
| {{page> | {{page> | ||




