Release Notes For Linux v1.0

Posted on

This is the release notes for linux release v1.0 (source code: linux-1.0.tar.gz) with format adjusted by removing/replacing tabs/spaces/new lines. This notes document can give us an understanding of the early development of the Linux kernel. The original ASCII formatted version is at the end of this post. CHANGES since 0.99 patchlevel 15: removed all the
Read more

Maximum number of mmap()’ed ranges and how to set it on Linux?

Posted on

What’s the maximum number of mmap()‘ed ranges that a process can makes and how to set the limits on Linux? I have a program that mmap()s and mprotect()s lots ranges. After allocating many ranges, mprotect() starts to fail with ENOMEM error number. From the man page, ENOMEM means 2 possible problems: ENOMEM Internal kernel structures
Read more

mmap a large range of memory which is larger than the total size of physical memory and swap

Posted on

How to make mmap() a large range of memory which is larger than the total size of physical memory and swap successfully? Short answer: Adding the MAP_NORESERVE flag to mmap() to make it not reserve any swap space for the mapping. For example: rr_addr = mmap((void*)i, len, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE|MAP_NORESERVE, -1, 0); More details in: http://stackoverflow.com/questions/4803152/mmap-fails-when-length-is-larger-than-4gb

mmap a large range of memory which is larger than the total size of physical memory and swap

Posted on

How to make mmap() a large range of memory which is larger than the total size of physical memory and swap successfully? Short answer: Adding the MAP_NORESERVE flag to mmap() to make it not reserve any swap space for the mapping. For example: rr_addr = mmap((void*)i, len, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE|MAP_NORESERVE, -1, 0); More details in: http://stackoverflow.com/questions/4803152/mmap-fails-when-length-is-larger-than-4gb

How to Statically Link C and C++ Programs on Linux with gcc

Posted on

Before statically linking you C and C++ programs, you should be aware of the drawbacks of the static linking especially with glibc. There are some good discussions already: with glibc you’re linking static programs which are not really static and some others here and here. That said, you can choose to statically link C and
Read more