Skip to content

Commit

Permalink
FreeBSD: malloc_usable_size is in <malloc_np.h> (#1428)
Browse files Browse the repository at this point in the history
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
  • Loading branch information
wjwithagen authored and yiwu-arbug committed Oct 28, 2016
1 parent 9c0bb7f commit 0aab5e5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions table/block.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@
#include <string>
#include <vector>
#ifdef ROCKSDB_MALLOC_USABLE_SIZE
#ifdef OS_FREEBSD
#include <malloc_np.h>
#else
#include <malloc.h>
#endif
#endif

#include "db/dbformat.h"
#include "db/pinned_iterators_manager.h"
Expand Down
4 changes: 4 additions & 0 deletions util/arena.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@

#include "util/arena.h"
#ifdef ROCKSDB_MALLOC_USABLE_SIZE
#ifdef OS_FREEBSD
#include <malloc_np.h>
#else
#include <malloc.h>
#endif
#endif
#ifndef OS_WIN
#include <sys/mman.h>
#endif
Expand Down
4 changes: 4 additions & 0 deletions util/env_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@
#endif

#ifdef ROCKSDB_MALLOC_USABLE_SIZE
#ifdef OS_FREEBSD
#include <malloc_np.h>
#else
#include <malloc.h>
#endif
#endif
#include <sys/types.h>

#include <iostream>
Expand Down

0 comments on commit 0aab5e5

Please sign in to comment.