Index: /branches/1.3/mem.c
===================================================================
--- /branches/1.3/mem.c	(revision 675)
+++ /branches/1.3/mem.c	(revision 676)
@@ -91,5 +91,5 @@
 	realsize = ALIGN(realsize);
 
-	TRACE("avail: %d (%dKB). Allocate size: %d realsize: %d (%dKB)"
+	TRACE("avail: %lu (%luKB). Allocate size: %lu realsize: %lu (%luKB)"
 			, mem->avail, mem->avail / 1024
 			, size
@@ -104,5 +104,5 @@
 
 		b = NULL;
-		minsize = INT_MAX;
+		minsize = ULONG_MAX;
 
 		/* prev|cur */
@@ -161,5 +161,5 @@
 		 */
 
-		TRACE(" -> avail: %d (%dKB). new next: %p offset: %d %dKB. Got: %p"
+		TRACE(" -> avail: %lu (%luKB). new next: %p offset: %lu %luKB. Got: %p"
 				, mem->avail, mem->avail / 1024
 				, newb
@@ -183,5 +183,5 @@
 
 	cur = (xc_block_t *) (CHAR_PTR(p) - BLOCK_HEADER_SIZE());
-	TRACE("freeing: %p, size=%d", p, cur->size);
+	TRACE("freeing: %p, size=%lu", p, cur->size);
 	xc_block_check(cur);
 	assert((char*)mem < (char*)cur && (char*)cur < (char*)mem + mem->size);
@@ -198,5 +198,5 @@
 	size = cur->size;
 
-	TRACE(" avail %d (%dKB)", mem->avail, mem->avail / 1024);
+	TRACE(" avail %lu (%luKB)", mem->avail, mem->avail / 1024);
 	mem->avail += size;
 
@@ -216,5 +216,5 @@
 		TRACE("%s", " combine next");
 	}
-	TRACE(" -> avail %d (%dKB)", mem->avail, mem->avail / 1024);
+	TRACE(" -> avail %lu (%luKB)", mem->avail, mem->avail / 1024);
 	return size;
 }
@@ -297,4 +297,5 @@
 		return NULL;
 	}
+	TRACE("size=%lu", size);
 	mem->shm = shm;
 	mem->size = size;
Index: /branches/1.3/mem.h
===================================================================
--- /branches/1.3/mem.h	(revision 675)
+++ /branches/1.3/mem.h	(revision 676)
@@ -1,2 +1,4 @@
+#include "xc_shm.h"
+
 typedef struct _xc_mem_handlers_t xc_mem_handlers_t;
 
@@ -14,5 +16,5 @@
 typedef struct XC_MEM_IMPL xc_mem_t;
 typedef struct XC_MEMBLOCK_IMPL xc_block_t;
-typedef unsigned int xc_memsize_t;
+typedef xc_shmsize_t xc_memsize_t;
 
 /* shm::mem */
Index: /branches/1.3/xcache.c
===================================================================
--- /branches/1.3/xcache.c	(revision 675)
+++ /branches/1.3/xcache.c	(revision 676)
@@ -2840,5 +2840,5 @@
 	}
 
-	*p = zend_atoi(value, strlen(value));
+	*p = zend_atol(value, strlen(value));
 	return SUCCESS;
 }
