Sfoglia il codice sorgente

fix xtest

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1391 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
tags/3.1.0-rc1
Xuefer 7 anni fa
parent
commit
f7035318b7
4 ha cambiato i file con 16 aggiunte e 7 eliminazioni
  1. +5
    -1
      util/xc_trace.c
  2. +7
    -1
      xcache/xc_allocator.c
  3. +2
    -5
      xcache/xc_allocator_bestfit.c
  4. +2
    -0
      xcache/xc_malloc.c

+ 5
- 1
util/xc_trace.c Vedi File

@@ -1,4 +1,8 @@
#include "php.h"
#ifdef TEST
# define PHP_DIR_SEPARATOR '/'
#else
# include "php.h"
#endif
#include "xc_trace.h"
#include <stdio.h>
#include <stdarg.h>


+ 7
- 1
xcache/xc_allocator.c Vedi File

@@ -1,4 +1,10 @@
#include "xcache.h"
#ifdef TEST
# ifdef HAVE_CONFIG_H
# include <config.h>
# endif
#else
# include "xcache.h"
#endif
#include "xc_allocator.h"
#include <string.h>
#include <stdio.h>


+ 2
- 5
xcache/xc_allocator_bestfit.c Vedi File

@@ -53,13 +53,10 @@ typedef struct _xc_allocator_bestfit_t {
xc_allocator_bestfit_block_t headblock[1]; /* just as a pointer to first block*/
} xc_allocator_bestfit_t;

#ifndef XtOffsetOf
# include <linux/stddef.h>
# define XtOffsetOf(s_type, field) offsetof(s_type, field)
#endif
#include <stddef.h>

#define SizeOf(type, field) sizeof( ((type *) 0)->field )
#define BLOCK_HEADER_SIZE() (ALIGN( XtOffsetOf(xc_allocator_bestfit_block_t, size) + SizeOf(xc_allocator_bestfit_block_t, size) ))
#define BLOCK_HEADER_SIZE() (ALIGN( offsetof(xc_allocator_bestfit_block_t, size) + SizeOf(xc_allocator_bestfit_block_t, size) ))

#define BLOCK_MAGIC ((unsigned int) 0x87655678)



+ 2
- 0
xcache/xc_malloc.c Vedi File

@@ -221,7 +221,9 @@ static XC_SHM_MEMDESTROY(xc_malloc_memdestroy) /* {{{ */
/* }}} */

static xc_allocator_vtable_t xc_allocator_malloc_vtable = XC_ALLOCATOR_VTABLE(allocator_malloc);
#ifndef TEST
static xc_shm_handlers_t xc_shm_malloc_handlers = XC_SHM_HANDLERS(malloc);
#endif
void xc_allocator_malloc_register() /* {{{ */
{
if (xc_allocator_register("malloc", &xc_allocator_malloc_vtable) == 0) {


Caricamento…
Annulla
Salva