diff options
author | Jeff Brown <jeffbrown@google.com> | 2011-01-11 12:38:32 -0800 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2011-02-03 16:58:38 -0800 |
commit | b415faba7482dd7ee3335f0f1518333554e3da0d (patch) | |
tree | 651af759a6d8d99349e844fe4cb11bc44347a644 /libdb/db_manage.c | |
parent | 219a1d03a9de33ae62abdb0cf5c45126940d0ace (diff) | |
download | oprofile-b415faba7482dd7ee3335f0f1518333554e3da0d.tar.gz |
Compile oprofile tools on the host.
Some of the new build targets are disabled for now because libbfd is
not currently provided by the prebuilt toolchain for all platforms.
Change-Id: Ie2c24bf997c9c5f15f6c3e2eaf949d73578890d8
Diffstat (limited to 'libdb/db_manage.c')
-rw-r--r-- | libdb/db_manage.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libdb/db_manage.c b/libdb/db_manage.c index 17a0be5..5fc6fe9 100644 --- a/libdb/db_manage.c +++ b/libdb/db_manage.c @@ -77,12 +77,21 @@ int odb_grow_hashtable(odb_data_t * data) if (ftruncate(data->fd, new_file_size)) return 1; +#ifdef MISSING_MREMAP + new_map = mmap(0, new_file_size, PROT_READ | PROT_WRITE, + MAP_SHARED, data->fd, 0); +#else new_map = mremap(data->base_memory, old_file_size, new_file_size, MREMAP_MAYMOVE); +#endif if (new_map == MAP_FAILED) return 1; +#ifdef MISSING_MREMAP + munmap(data->base_memory, old_file_size); +#endif + data->base_memory = new_map; data->descr = odb_to_descr(data); data->descr->size *= 2; |