Subject: Re: SysV SHM locking and reallocating support
To: None <>
From: Mindaugas <>
List: tech-kern
Date: 09/24/2006 23:23:15
Thanks for the answer.
I finished all mentioned things, a patch will be soon :)

> The realloc should return an error if there is an invalid argument
> or could not allocate memory. This would be an indication to the user
> that something failed at sysctl time (and the sysctl value should not
> be changed on failure).
Yes, in this case it is strucutrally wrong, that sysctl does not return
any error. The sysctl value changing can be made only after the real
value changing.
The problem is that we cannot reallocate if we set lesser memory size
than we are using. Checking for shmrealloc() in segment allocation
"waits" for acting with memory (in fact, checking should also be in
segment deallocation). Otherwise, user must delete segments manually
with ipcrm(1) or close applications which is using shared memory. I
think it is less comfortable.
Should we go considering that new_size < currently_used_size -> fault?
Any other solution?

Best regards,