Difference between revisions of "Lua:enumMemoryRegions"
Jump to navigation
Jump to search
(Created page with "Category:Lua {{CodeBox|'''function''' enumMemoryRegions() ''':''' table}} Returns a table containing the memory layout with information about each memory region. ===Func...") |
m (Syntax Highlighting.) |
||
| Line 21: | Line 21: | ||
===Examples=== | ===Examples=== | ||
| − | < | + | <syntaxhighlight lang="lua" line> |
for i, region in ipairs(enumMemoryRegions()) do | for i, region in ipairs(enumMemoryRegions()) do | ||
print(string.format("%X, %X", region.BaseAddress, region.RegionSize)) | print(string.format("%X, %X", region.BaseAddress, region.RegionSize)) | ||
end | end | ||
| − | </ | + | </syntaxhighlight> |
{{LuaSeeAlso}} | {{LuaSeeAlso}} | ||
{{Process}} | {{Process}} | ||
Latest revision as of 20:38, 25 June 2026
Returns a table containing the memory layout with information about each memory region.
Function Parameters[edit]
<none>
Returns[edit]
Table — A table with the following fields:
- BaseAddress — Integer representing the base address of the region
- AllocationBase — Integer representing the base address of the range
- AllocationProtect — Integer representing the protection when the region was initially allocated
- RegionSize — Integer representing the size of the region
- State — Integer representing the state of the pages in the region
- Protect — Integer representing the protection of the pages in the region
- Type — Integer representing type of pages in the region
See MSDN MEMORY_BASIC_INFORMATION
Examples[edit]
1 for i, region in ipairs(enumMemoryRegions()) do
2 print(string.format("%X, %X", region.BaseAddress, region.RegionSize))
3 end