httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Gambarin <stanl...@cs.bu.edu>
Subject memory allocations stuff (question)
Date Wed, 09 Jul 1997 15:33:17 GMT

	Greetings... a couple of questions on the memory allocation.
First, (correct me if I am wrong), but should not all the functions that
relate to the memory allocation (like, malloc_block, pcalloc, etc), have
unsigned arguments, instead of signed values.  For example, pcalloc()
accepts an int, but should, in theory, contain unsigned int, unless some
stupid moron calls pcalloc(-1).  There is also a check inside pcalloc()
for the value being negative, so eliminating the signness of the argument
would eliminate "if" statement and considering how many times pcalloc is 
called, might even speed server up a little bit.

Second: would it be reasonable to provide a limit on the maximum amount 
of memory that the server may allocate (this may prevent infinite loops
taking down whole machine with them).  The server may just exit if the 
maximum amount of memory is reached (configurable at runtime) ?

						Stanley.


Mime
View raw message