mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 23:28:12 +00:00
UserspaceEmulator: Mark mmap regions as malloc blocks when mallocing
We don't have to be clever at all to figure out which MmapRegions are malloc blocks, we can just mark the containing region as such when the emulated process performs a malloc! :^)
This commit is contained in:
parent
5de7bae383
commit
030edbd513
3 changed files with 7 additions and 8 deletions
|
@ -65,13 +65,6 @@ MmapRegion::~MmapRegion()
|
|||
free(m_data);
|
||||
}
|
||||
|
||||
bool MmapRegion::is_malloc_block() const
|
||||
{
|
||||
// FIXME: This is obviously incomplete!
|
||||
// We should somehow know which mmap regions are malloc blocks.
|
||||
return !m_file_backed;
|
||||
}
|
||||
|
||||
ValueWithShadow<u8> MmapRegion::read8(FlatPtr offset)
|
||||
{
|
||||
if (!is_readable()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue