Skip to content

Instantly share code, notes, and snippets.

@KristianLyng
Created January 13, 2011 21:44
Show Gist options
  • Select an option

  • Save KristianLyng/778675 to your computer and use it in GitHub Desktop.

Select an option

Save KristianLyng/778675 to your computer and use it in GitHub Desktop.
(gdb) call malloc(50)
$1 = (void *) 0xd2a480
(gdb) call *((unsigned long long *)$1) = 500
$2 = 500
(gdb) call *((unsigned long long *)($1+8)) = 2000
$3 = 2000
(gdb) call setrlimit(7,$1)
$4 = 0
(gdb) detach
Detaching from program: /proc/17514/exe, process 17514
(gdb) quit
root@luke:/proc/17514# grep 'open files' limits
Max open files 500 2000 files
root@luke:/proc/17514#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment