Hi Alex,

It depends if you're using full system or syscall emulation mode. If you're
using FS mode, you would have to modify your (guest) kernel to have a
separate heap region. If you're using SE mode, gem5 *does* control the
virtual to physical memory layout. Here's the function where heap memory is
allocated:
https://gem5.googlesource.com/public/gem5/+/refs/heads/master/src/sim/syscall_emul.cc#242.
Hopefully that can get you started :).

Cheers,
Jason

On Tue, Oct 29, 2019 at 6:49 AM Alex Freij <[email protected]> wrote:

> Hi all,
>
> I am looking into implementing a protected region of heap memory that is
> usable only by benchmarks. I am trying to understand the interaction
> between gem5 and system memory, and whether simulations run in gem5
> allocate memory only from the heap allocated to gem5 by the local system
> (as seen in /proc/pid/maps) or if other behavior is observed. Is there
> anywhere within the code base to analyze how/where memory is allocated for
> benchmarks?
>
> Thanks in advance!
>
> Sincerely,
>
> - Alex
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to