Memcached crashing on FreeBSD
    Jacob Coby 
    jcoby at listingbook.com
       
    Mon Apr 11 11:49:49 PDT 2005
    
    
  
Anatoly Vorobey wrote:
  > MALLOC_OPTIONS is probably better as Jacob Coby notes in another
> message. It'll have the benefit of working on Open/Net BSDs provided
> they interpret the letters in the same way.
> 
> [after checking: no, it won't; NetBSD and OpenBSD understand the 
> letters similarly, but they have malloc_options, 
> not _malloc_options. Hooray for diversity!]
Figures.  Well, there is the option of doing something like:
#if defined(__NetBSD__) || define(__OpenBSD__)
malloc_options = MALLOC_OPTIONS;
#elseif defined(__FreeBSD__)
_malloc_options = MALLOC_OPTIONS;
#endif
-- or --
In config.h:
redefine _malloc_options to be malloc_options on __FreeBSD__
in memcached.c, before or in settings_init() (as long as it's before any 
call to malloc() or realloc() it'll probably be OK)
#if defined(__NetBSD__) || defined(__OpenBSD__) ||  defined(__FreeBSD__)
malloc_options = MALLOC_OPTIONS;
#endif
May even want to tag the define as BSD_MALLOC_OPTIONS since I think only 
the *BSDs have it?  *shrug*
-- 
-Jacob
    
    
More information about the memcached
mailing list