tptp.cc code.html


Here I place various pieces of code that I have written. This is far complete as the security.html page is far from complete do to constant institutions and loosing computers, etc.

memrwtest.c
memrwtest.c.txt
This code uses mmap to allocate a buffer of 'x' megabytes. After that it uses mlock to lock the memory resident, then it tests how long it takes to read and fill the buffer with x megabytes. See the code header for more technical information.

On a 1998 Ultra 30 300Mhz 2MB 512MB this code gave a score of only 4 times less than a 2009 HP G60 2.2Ghz x2 1MB 3GB. :P it's kinda fun to compare systems and os's in a potentially everyday situation, any serious effort towards comparison would obviously want to go further with other venues.
lsof-ident.c
lsof-identd.c.txt
This is an identd server version of a perl server that uses lsof to get the user info from the kernel about socket ownership. Read more about it in the header of the file.
irssi-FiSH-1.04.pl
irssi-FiSH-1.04.pl.txt
This is a perl script I wrote to replace the FiSH encryption module for irssi. Which is and was way buggy. I was not in the mood to do it in c.
daemon.c
daemon.c.txt
This will daemonize the commandline and detach from the terminal (unlike nohup) so it will avoid kills from terminal related interrupts.