Changeset: 7efa6b9210dc for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7efa6b9210dc
Modified Files:
gdk/gdk_bbp.c
gdk/gdk_posix.c
Branch: default
Log Message:
Merge with Feb2013 branch.
diffs (68 lines):
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -2628,7 +2628,7 @@ BBPtrim_scan(bat bbppos, bat bbplim)
GDKqsort(lastused, bbptrim, NULL, bbptrimlast,
sizeof(lastused[0]), sizeof(bbptrim[0]), TYPE_int);
for (i = bbptrimfirst = 0; i < bbptrimlast; i++) {
- MEMDEBUG THRprintf(GDKstdout, "#TRIMSCAN: %11d%c
%9d=%s\t(#" BUNFMT ")\n", BBPLASTUSED(lastused[i]), (lastused[i] & 0x80000000)
? '*' : ' ', i, BBPname(bbptrim[i].bid), bbptrim[i].cnt);
+ MEMDEBUG THRprintf(GDKstdout, "#TRIMSCAN: %11d%c
%9d=%s\t(#" BUNFMT ")\n", BBPLASTUSED(lastused[i]), (lastused[i] & (1 << 31)) ?
'*' : ' ', i, BBPname(bbptrim[i].bid), bbptrim[i].cnt);
bbptrim[i].next = i + 1;
}
@@ -2867,7 +2867,7 @@ BBPtrim(size_t target)
}
MEMDEBUG THRprintf(GDKstdout, "#BBPTRIM: %8d%c %7d
%s\n",
BBPLASTUSED(lastused[i]),
- lastused[i] & 0x80000000 ? '*' : ' ',
+ lastused[i] & (1 << 31) ? '*' : ' ',
(int) bbptrim[i].bid,
BBPname(bbptrim[i].bid));
diff --git a/gdk/gdk_posix.c b/gdk/gdk_posix.c
--- a/gdk/gdk_posix.c
+++ b/gdk/gdk_posix.c
@@ -371,7 +371,6 @@ MT_mmap(const char *path, int mode, size
int fd = open(path, O_CREAT | ((mode & MMAP_WRITE) ? O_RDWR :
O_RDONLY), MONETDB_MODE);
void *ret = (void *) -1L;
- assert(len % MT_pagesize() == 0);
if (fd >= 0) {
ret = mmap(NULL,
len,
@@ -389,7 +388,6 @@ MT_munmap(void *p, size_t len)
{
int ret = munmap(p, len);
- assert(len % MT_pagesize() == 0);
#ifdef MMAP_DEBUG
fprintf(stderr, "#munmap(" PTRFMT "," SZFMT ") = %d\n", PTRFMTCAST p,
len, ret);
#endif
@@ -410,9 +408,6 @@ MT_mremap(const char *path, int mode, vo
/* doesn't make sense for us to extend read-only memory map */
assert(mode & MMAP_WRITABLE);
- assert(old_size % MT_pagesize() == 0);
- assert(*new_size % MT_pagesize() == 0);
- assert((size_t) old_address % MT_pagesize() == 0);
if (*new_size < old_size) {
/* shrink */
@@ -702,7 +697,6 @@ MT_mmap(const char *path, int mode, size
HANDLE h1, h2;
void *ret;
- assert(len % MT_pagesize() == 0);
if (mode & MMAP_WRITE) {
mode0 |= FILE_APPEND_DATA | FILE_WRITE_ATTRIBUTES |
FILE_WRITE_DATA;
}
@@ -773,9 +767,6 @@ MT_mremap(const char *path, int mode, vo
/* doesn't make sense for us to extend read-only memory map */
assert(mode & MMAP_WRITABLE);
- assert(old_size % MT_pagesize() == 0);
- assert(*new_size % MT_pagesize() == 0);
- assert((size_t) old_address % MT_pagesize() == 0);
if (old_size >= *new_size) {
*new_size = old_size;
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list