mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 08:48:29 +00:00
Add tool for viewing memory
https://justine.storage.googleapis.com/memzoom/index.html
This commit is contained in:
parent
2d80bbc802
commit
9fe95ef12b
22 changed files with 1511 additions and 1028 deletions
|
@ -28,6 +28,7 @@
|
|||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sysv/consts/map.h"
|
||||
#include "libc/sysv/consts/mremap.h"
|
||||
#include "libc/sysv/consts/msync.h"
|
||||
#include "libc/sysv/consts/o.h"
|
||||
#include "libc/sysv/consts/ok.h"
|
||||
#include "libc/sysv/consts/prot.h"
|
||||
|
@ -177,6 +178,7 @@ struct ElfWriter *elfwriter_open(const char *path, int mode) {
|
|||
void elfwriter_close(struct ElfWriter *elf) {
|
||||
size_t i;
|
||||
FlushTables(elf);
|
||||
CHECK_NE(-1, msync(elf->map, elf->wrote, MS_SYNC));
|
||||
CHECK_NE(-1, munmap(elf->map, elf->mapsize));
|
||||
CHECK_NE(-1, ftruncate(elf->fd, elf->wrote));
|
||||
CHECK_NE(-1, close(elf->fd));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue