20.2.5 Managing memory

It is also possible to allocate and free new memory regions on the child process at specified or decided by the system. In the following example we are allocating 10 MB in the child process.

[0x000000C0]> !alloc 10M
0xb7587000
[0x000000C0]> s 0xb7587000
[0xB7587000]> x
   offset   0 1  2 3  4 5  6 7  8 9  A B  C D  0123456789ABCD
0xB7587000, 0000 0000 0000 0000 0000 0000 0000 ..............
0xB758700E  0000 0000 0000 0000 0000 0000 0000 ..............

We can now write the contents of a file here:

[0xb7587000]> wf program.bin

But there's another option for mapping files in memory: '!mmap':

XXX: this is not working

In the same way you can create a core file with '!core'. But this is currently system-specific.