I once ran into an instance where the Unix admins didn’t believe me that i was running out of shared memory despite the errors, I was showing them. I wrote this perl script to allocate chunks of shared memory until it failed to prove to them that yes, regardless of what you have the global ulimits set to my user’s limits were lower.
#!/usr/bin/perl -w use IPC::SysV qw(IPC_PRIVATE IPC_RMID S_IRWXU); #$size = 314580992; $size = 50000000; $id = shmget(IPC_PRIVATE, $size, S_IRWXU) || die "$!"; sleep 10; shmctl($id, IPC_RMID, 0)
0 Comments.