Commit Graph

12 Commits

Author SHA1 Message Date
4dc599381f Refactor memory management into wibo::heap
- Removes blockUpper2GB hack; we now start early in the process
  and reserve all (available) space in the lower 2GB address
  space, leaving the upper 2GB untouched for host code
- All virtual memory operations flow through wibo::heap for
  bookkeeping
- All guest code uses a guest mimalloc area + thread-local heaps
  reserved in the guest address space
2025-11-03 13:58:33 -07:00
55a62a27c9 Initial guest-to-host trampoline generation 2025-10-30 02:23:09 -06:00
9367f003c5 Refactor to use TIB LastErrorValue 2025-10-28 10:01:21 -06:00
8bd15bd272 Fix heapapi ownership checks
`mi_heap_check_owned` does not work for allocations that span
multiple blocks; `mi_is_in_heap_region` is a less precise but
working way for us to check if a pointer is in our heap.

See https://github.com/microsoft/mimalloc/issues/298
2025-10-27 17:04:57 -06:00
2ffc56f5c2 Improve heapapi implementation 2025-10-08 18:11:37 -06:00
166b9036fd Dont set ERROR_SUCCESS generally
Turns out we should only be setting this in a select few cases.
2025-10-06 00:03:10 -06:00
0d76e541c1 Reorg headers, module_registry -> modules, remove ActCtx msvcr80.dll hack 2025-10-05 17:46:16 -06:00
b87fb5e472 Implement some ActCtx functions for msvcr80.dll 2025-10-05 15:52:38 -06:00
0bc80b6618 Split into HostContextGuard/GuestContextGuard 2025-10-05 14:32:06 -06:00
cd7baffc5e Save/restore fs/gs segments when re-entering host code 2025-10-05 13:58:40 -06:00
390f26b28d New handles, threading and processes subsystems 2025-10-04 13:31:26 -06:00
fa3ed4893a Split kernel32 into separate files (part 2) 2025-10-02 00:20:28 -06:00