Subject: Re: SysV SHM locking and reallocating support
To: None <firstname.lastname@example.org>
From: Christos Zoulas <email@example.com>
Date: 09/24/2006 23:24:46
In article <firstname.lastname@example.org>,
Mindaugas <email@example.com> wrote:
>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
>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?
Just fail decreasing the size if you cannot do it.