Reputation
25,000
Next tag badge:
95/100 score
19/20 answers
Badges
3 37 88
Newest
 Good Answer
Impact
~2.5m people reached

Aug
15
comment Malloc and Paging
@user100503 - Yes, malloc()/calloc()/realloc() allocate from the heap. A little-used function alloca() allocates on the stack, but it's easy to make mistakes with alloca(). I believe that writing to an allocated page causes the kernel to actually allocate the physical memory. I can't point at any code or anything, but I'm still pretty sure.
Aug
11
answered Malloc and Paging
Aug
9
awarded  Nice Answer
Jul
31
comment How do pwd and . determine the current path differently?
In Unix, Linux and other filesystems, an inode number is actually a file's identifier to the operating system. Depends on the filesystem, but there's usually a very quick way to go from inode number to the disk block that the inode lives. The inode itself is the on-disk structure representing a file: ownership, permissions, which data blocks contain file's data, access times, etc. A directory is just a mapping from a textual name to an inode number, the quick lookup of disk block from inode number allows the OS to get data and metadata quickly.
Jul
31
answered How do pwd and . determine the current path differently?
Jul
31
awarded  Great Answer
Jul
30
answered How to determine what instructions a process is executing?
Jul
29
comment What is #@(#) in Kornshell syntax
@MaxVernon - you're welcome. I personally love this kind of question, as it exposes actual practices to a wider community, and it lets me mine my memory for whatever absurditites it has retained. If I might editorialize: "@(#)" saved me a few times in High Ritual production environments in the past. Why hasn't it survived? Knowing what versions got compiled together seems like valuable info.
Jul
29
answered What is #@(#) in Kornshell syntax
Jul
28
comment Difference between Unix OS Types
OSX is derived from Mach 2.5, with a thin layer of BSD compatibility on top. I'm not so sure it's FreeBSD, it might actually be BSD 4.4 lite or whatever that last BSD release was.
Jul
28
comment Linux kernel manual build: resulting binary is 10 times larger than precompiled binaries
I don't know about modules. That was one question I had before I recommeded make vmlinuz.
Jul
28
answered Linux kernel manual build: resulting binary is 10 times larger than precompiled binaries
Jul
26
answered why bash increment: `n=0;((n++));` return error?
Jul
21
comment Updating PHP to Gaurd Against Mayhem Malware
@Boundless - the code I got, which is identical to what Virus Bulletin reports (virusbtn.com/virusbulletin/archive/2014/07/vb201407-Mayhem) only uses simple PHP - fopen()/fclose() is about as exotic as it gets. The dropper code does call system(), which runs a command via the shell, so you could potentially disable system(): cyberciti.biz/faq/… Like I wrote above, the PHP it uses is nothing special.
Jul
21
answered Updating PHP to Gaurd Against Mayhem Malware
Jul
20
awarded  Nice Question
Jul
18
comment Low level system call
@saurav1405 - you can look at the source to find out, but for Musl libc, you can look at http://git.musl-libc.org/cgit/musl/tree/src/unistd/read.c - it's in C, but it uses a macro that I trace to the file src/thread/x86_64/syscall_cp.s. The macro expands into in-line assembly. So I'm not sure what to call it: "written in assembly" or "written in C with a line or two of assembly". Probably the latter.
Jul
16
answered System calls source code
Jul
16
answered Low level system call
Jul
10
answered Why Nethogs won't see the PID of the processes the generating some NFS traffic?