httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject RE: cvs commit: apache-2.0/src/modules/standard mod_auth_digest.c
Date Fri, 02 Jun 2000 20:12:03 GMT

> > The solution that I like best is to have the feature macro 
> > which the core
> > uses to implement a server_wide allocation function, using 
> > either palloc
> > or malloc or ap_shm_malloc depending on the context and MPM.
> 
> I don't believe palloc/malloc map well to shm.  But show us
> otherwise if you like.


malloc/free:
ap_shm_init      -->  void (no-op)
ap_shm_destroy   -->  void (no-op)
ap_shm_malloc    -->  malloc
ap_shm_calloc    -->  calloc
ap_shm_free      -->  free
ap_get_shm_name  -->  return NULL, because this is anonymous memory
ap_set_shm_name  -->  void, anonymous shared memory
ap_open_shmem    -->  void (no-op) we don't have a child process
ap_shm_avail     -->  figure out how much system memory is
available.  Have no clue how to do this on Windows.

ap_palloc:
ap_shm_init      -->  ap_initialize
ap_shm_destroy   -->  ap_terminate
ap_shm_malloc    -->  ap_palloc
ap_shm_calloc    -->  ap_pcalloc
ap_shm_free      -->  register cleanup
ap_get_shm_name  -->  return NULL, because this is anonymous memory
ap_set_shm_name  -->  void, anonymous shared memory
ap_open_shmem    -->  void (no-op) we don't have a child process
ap_shm_avail     -->  There is a function but I can't remember it right
now.
available.  Have no clue how to do this on Windows.

The thought process maps better to malloc/free than ap_palloc IMHO though.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------



Mime
View raw message