httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@ast.cam.ac.uk (David Robinson)
Subject Alloc bug
Date Wed, 31 Jan 1996 18:40:00 GMT
Apaches memory allocator doesn't align the returned memory address so that
it can be used for doubles.

Here is a patch:
*** alloc.c.orig        Sun Dec 17 14:32:29 1995
--- alloc.c     Wed Jan 31 18:38:09 1996
***************
*** 72,78 ****
  union align
  {
    /* Types which are likely to have the longest RELEVANT alignment
!    * restrictions... we don't do much with doubles.
     */
    
    char *cp;
--- 72,78 ----
  union align
  {
    /* Types which are likely to have the longest RELEVANT alignment
!    * restrictions...
     */
    
    char *cp;
***************
*** 79,84 ****
--- 79,85 ----
    void (*f)();
    long l;
    FILE *fp;
+   double d;
  };
  
  #define CLICK_SZ (sizeof(union align))

Mime
View raw message