cvs: pecl(APC_3_0) /apc apc_sma.c
| From: | Rasmus Lerdorf | Date: | Fri, 28 Mar 2008 20:17:47 +0000 |
| Subject: | cvs: pecl(APC_3_0) /apc apc_sma.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-10097@lists.php.net to get a copy of this message | ||
rasmus Fri Mar 28 20:17:47 2008 UTC
Modified files: (Branch: APC_3_0)
/pecl/apc apc_sma.c
Log:
This was causing crashes. Play with this in 3.1 instead.
http://cvs.php.net/viewvc.cgi/pecl/apc/apc_sma.c?r1=1.69.2.1&r2=1.69.2.2&diff_format=u
Index: pecl/apc/apc_sma.c
diff -u pecl/apc/apc_sma.c:1.69.2.1 pecl/apc/apc_sma.c:1.69.2.2
--- pecl/apc/apc_sma.c:1.69.2.1 Tue Mar 25 18:04:53 2008
+++ pecl/apc/apc_sma.c Fri Mar 28 20:17:47 2008
@@ -26,7 +26,7 @@
*/
-/* $Id: apc_sma.c,v 1.69.2.1 2008/03/25 18:04:53 gopalv Exp $ */
+/* $Id: apc_sma.c,v 1.69.2.2 2008/03/28 20:17:47 rasmus Exp $ */
#include "apc_sma.h"
#include "apc.h"
@@ -416,16 +416,6 @@
LOCK(((header_t*)sma_shmaddrs[sma_lastseg])->sma_lock);
off = sma_allocate(sma_shmaddrs[sma_lastseg], n);
- if(off == -1) {
- /* retry failed allocation after we expunge */
- UNLOCK(((header_t*)sma_shmaddrs[sma_lastseg])->sma_lock);
- orig_mem_size_ptr = APCG(mem_size_ptr);
- APCG(mem_size_ptr) = NULL;
- APCG(current_cache)->expunge_cb(APCG(current_cache), n);
- APCG(mem_size_ptr) = orig_mem_size_ptr;
- LOCK(((header_t*)sma_shmaddrs[sma_lastseg])->sma_lock);
- off = sma_allocate(sma_shmaddrs[sma_lastseg], n);
- }
if (off != -1) {
void* p = (void *)(((char *)(sma_shmaddrs[sma_lastseg])) + off);
if (APCG(mem_size_ptr) != NULL) { *(APCG(mem_size_ptr)) += n; }
@@ -443,16 +433,6 @@
}
LOCK(((header_t*)sma_shmaddrs[i])->sma_lock);
off = sma_allocate(sma_shmaddrs[i], n);
- if(off == -1) {
- /* retry failed allocation after we expunge */
- UNLOCK(((header_t*)sma_shmaddrs[i])->sma_lock);
- orig_mem_size_ptr = APCG(mem_size_ptr);
- APCG(mem_size_ptr) = NULL;
- APCG(current_cache)->expunge_cb(APCG(current_cache), n);
- APCG(mem_size_ptr) = orig_mem_size_ptr;
- LOCK(((header_t*)sma_shmaddrs[i])->sma_lock);
- off = sma_allocate(sma_shmaddrs[sma_lastseg], n);
- }
if (off != -1) {
void* p = (void *)(((char *)(sma_shmaddrs[i])) + off);
if (APCG(mem_size_ptr) != NULL) { *(APCG(mem_size_ptr)) += n; }