The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 01-25-2002
troccola troccola is offline
Registered User
 

Join Date: Jan 2002
Posts: 5
plock() memory locking problems

I'm experiencing some strangeness when using plock().

I'm on a Solaris 5.7/SPARC machine with 64MB of memory.

I can show that plock() works by successfully locking down 10 MB of memory.

Then, I ask for 40 MB, and I get a failure notice because there is "Not enough memory" available.

I then try to get 10 MB again, and get the same "Not enough memory" failure.

Why doesn't the 10 MB lock down the second time?
I have freed everything, the memory should be available again.

Here's a link to the source code... any ideas?

http://www.wegotitall.com/user_space/troccola/plock.c

Thanks!
Remove advertisements
!!
Forum Sponsor