Drawbacks of using /LARGEADDRESSAWARE for 32-bit Windows executables?

blindly applying the LargeAddressAware flag to your 32bit executable deploys a ticking time bomb! by setting this flag you are testifying to the OS: yes, my application (and all DLLs being loaded during runtime) can cope with memory addresses up to 4 GB. so don’t restrict the VAS for the process to 2 GB but … Read more

Disable and re-enable address space layout randomization only for myself

The best way to disable locally the ASLR on a Linux-based system is to use processes personality flags. The command to manipulate personality flags is setarch with -R, –addr-no-randomize Disables randomization of the virtual address space (turns on ADDR_NO_RANDOMIZE). Here is how to proceed: $> setarch $(uname -m) -R /bin/bash This command runs a shell … Read more

Understanding Virtual Address, Virtual Memory and Paging

Before I answer your questions (I hope I do), here are a few introductory remarks: Remarks The problem here is that “virtual memory” has two senses. “Virtual memory” as a technical term used by low-level programmers has (almost) nothing to do with “virtual memory” as explained to consumers. In the technical sense, “virtual memory” is … Read more

Why is the ELF execution entry point virtual address of the form 0x80xxxxx and not zero 0x0?

As Mads pointed out, in order to catch most accesses through null pointers, Unix-like systems tend to make the page at address zero “unmapped”. Thus, accesses immediately trigger a CPU exception, in other words a segfault. This is quite better than letting the application go rogue. The exception vector table, however, can be at any … Read more

Is there any API for determining the physical address from virtual address in Linux?

Kernel and user space work with virtual addresses (also called linear addresses) that are mapped to physical addresses by the memory management hardware. This mapping is defined by page tables, set up by the operating system. DMA devices use bus addresses. On an i386 PC, bus addresses are the same as physical addresses, but other … Read more