[M3devel] coping with low memory/resources?

Jay jay.krell at cornell.edu
Mon May 4 12:09:12 CEST 2009


I invented a policy of one immediate retry for EAGAIN.
I'm not sure that will help but it won't hurt much.
I'm leary of infinite retry.


This will be active maybe tonight.


 - Jay


----------------------------------------
> From: jay.krell at cornell.edu
> To: m3devel at elegosoft.com
> Subject: coping with low memory/resources?
> Date: Wed, 29 Apr 2009 12:27:48 +0000
>
>
> coping with low memory/resources?
>
>
> We have code that does like
> r := pthread_do_something()
> assert(r == 0);
>
>
> where for example:
> [EAGAIN]
> The system lacked the necessary resources (other than memory) to initialise another mutex.
> [ENOMEM]
> Insufficient memory exists to initialise the mutex.
>
>
> I'll fix it to raise an out of memory exception for ENOMEM. Ok.
> But what about EAGAIN?
> Retry? That is what "again" means, right?
> In an infinite loop?
> Or just a few times?
> You know -- overall system might be low but other parts might reduce,
> or the Modula-3 code itself might be hogging resources and retry might
> just sit there forever.
> Raise some other exception?
>
> For now I'll leave it asserting.
>
>
> - Jay



More information about the M3devel mailing list