Date: 04/28/00
- Next message: Hartmut Holzgraefe: "[PHP-DEV] cvs: /php3/functions head.c"
- Previous message: Jon Forsberg: "Re: [PHP-DEV] setlocale(LC_CTYPE, "") in main.c"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Is there a way to detect that emalloc() was unable to allocate specified
memory and recover gracefully? Right now it either dumps core in DEBUG
mode or exits in non-debug.
-Andrei
As I was going up the stair, I met a man who wasn't there.
He wasn't there again today. I wish, I wish he'd stay away.
-Hughes Mearns
attached mail follows:
| On Fri, 28 Apr 2000, Faisal Nasim wrote:
| > | On Fri, 28 Apr 2000, Faisal Nasim wrote:
| > | > By checking the result of emalloc().
| > |
| > | Heh, don't you think I would have done that if I could? The message
you
| > | see happens when emalloc() cannot allocate that much memory and it
just
| > | prints this messages and bails. That's it. It doesn't return.
| >
| > emalloc(), is that a library function?
| >
| > I don't see it in VC.
|
| It's a Zend function defined in zend_alloc.c.
Its there:
fprintf(stderr,"FATAL: emalloc(): Unable to allocate %ld bytes\n",
(long) size);
better change it into a warning! Or perhaps some flag to it so that
it can generate the FATAL error when some initialization function
calls it.
Faisal
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Hartmut Holzgraefe: "[PHP-DEV] cvs: /php3/functions head.c"
- Previous message: Jon Forsberg: "Re: [PHP-DEV] setlocale(LC_CTYPE, "") in main.c"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

