[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r5063 - in GNUnet/src/util: containers os
From: |
gnunet |
Subject: |
[GNUnet-SVN] r5063 - in GNUnet/src/util: containers os |
Date: |
Fri, 15 Jun 2007 16:57:22 -0600 (MDT) |
Author: grothoff
Date: 2007-06-15 16:57:22 -0600 (Fri, 15 Jun 2007)
New Revision: 5063
Modified:
GNUnet/src/util/containers/bloomfilter.c
GNUnet/src/util/os/cpustatus.c
Log:
minor fixme fixes
Modified: GNUnet/src/util/containers/bloomfilter.c
===================================================================
--- GNUnet/src/util/containers/bloomfilter.c 2007-06-15 22:57:03 UTC (rev
5062)
+++ GNUnet/src/util/containers/bloomfilter.c 2007-06-15 22:57:22 UTC (rev
5063)
@@ -50,7 +50,6 @@
*/
struct MUTEX * lock;
-
/**
* The actual bloomfilter bit array
*/
@@ -62,6 +61,11 @@
struct GE_Context * ectx;
/**
+ * Filename of the filter
+ */
+ char * filename;
+
+ /**
* The bit counter file on disk
*/
int fd;
@@ -418,7 +422,7 @@
ui*=2;
size = ui; /* make sure it's a power of 2 */
- bf = (Bloomfilter *) MALLOC(sizeof(Bloomfilter));
+ bf = MALLOC(sizeof(Bloomfilter));
bf->ectx = ectx;
/* Try to open a bloomfilter file */
#ifndef _MSC_VER
@@ -470,6 +474,7 @@
pos += BUFFSIZE * 2; /* 2 bits per byte in the buffer */
}
FREE(rbuff);
+ bf->filename = STRDUP(filename);
return bf;
}
@@ -485,8 +490,9 @@
return;
MUTEX_DESTROY(bf->lock);
disk_file_close(bf->ectx,
- NULL, /* FIXME: keep filename around! */
+ bf->filename,
bf->fd);
+ FREENONNULL(bf->filename);
FREE(bf->bitArray);
FREE(bf);
}
@@ -597,7 +603,7 @@
size = i; /* make sure it's a power of 2 */
bf->bitArraySize = size;
- bf->bitArray = (char*)MALLOC(size);
+ bf->bitArray = MALLOC(size);
memset(bf->bitArray,
0,
bf->bitArraySize);
Modified: GNUnet/src/util/os/cpustatus.c
===================================================================
--- GNUnet/src/util/os/cpustatus.c 2007-06-15 22:57:03 UTC (rev 5062)
+++ GNUnet/src/util/os/cpustatus.c 2007-06-15 22:57:22 UTC (rev 5063)
@@ -264,7 +264,7 @@
vm_deallocate(mach_task_self(),
(vm_address_t)cpu_load,
(vm_size_t)(cpu_msg_count * sizeof(*cpu_load)));
- currentIOLoad = -1; /* FIXME! */
+ currentIOLoad = -1; /* FIXME-OSX! */
return OK;
} else {
GE_LOG(NULL,
@@ -340,7 +340,7 @@
currentCPULoad = 100 - currentCPULoad; /* computed idle-load before! */
} else
currentCPULoad = -1;
- currentIOLoad = -1; /* FIXME! */
+ currentIOLoad = -1; /* FIXME-SOLARIS! */
last_idlecount = idlecount;
last_totalcount = totalcount;
return OK;
@@ -413,7 +413,7 @@
dLastIdle = dIdle;
dLastUser = dUser;
- currentIOLoad = -1; /* FIXME */
+ currentIOLoad = -1; /* FIXME-MINGW */
return OK;
} else {
/* only warn once, if there is a problem with
@@ -475,7 +475,7 @@
(LPBYTE) ¤tCPULoad,
&dwDataSize);
RegCloseKey(hKey);
- currentIOLoad = -1; /* FIXME! */
+ currentIOLoad = -1; /* FIXME-MINGW! */
/* Stop query */
RegOpenKeyEx(HKEY_DYN_DATA,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r5063 - in GNUnet/src/util: containers os,
gnunet <=