提交 5c64d614 编写于 作者: B Behdad Esfahbod

Add hb-blob-private.hh

Towards making blob more memory-allocation-friendly
上级 203dc44e
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
HB_BASE_sources = \ HB_BASE_sources = \
hb-atomic-private.hh \ hb-atomic-private.hh \
hb-blob-private.hh \
hb-blob.cc \ hb-blob.cc \
hb-buffer-private.hh \ hb-buffer-private.hh \
hb-buffer-serialize.cc \ hb-buffer-serialize.cc \
......
...@@ -31,8 +31,7 @@ ...@@ -31,8 +31,7 @@
#include "hb-private.hh" #include "hb-private.hh"
#include "hb-debug.hh" #include "hb-debug.hh"
#include "hb-blob-private.hh"
#include "hb-object-private.hh"
#ifdef HAVE_SYS_MMAN_H #ifdef HAVE_SYS_MMAN_H
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
...@@ -49,20 +48,6 @@ ...@@ -49,20 +48,6 @@
#include <fcntl.h> #include <fcntl.h>
struct hb_blob_t {
hb_object_header_t header;
ASSERT_POD ();
bool immutable;
const char *data;
unsigned int length;
hb_memory_mode_t mode;
void *user_data;
hb_destroy_func_t destroy;
};
static bool _try_writable (hb_blob_t *blob); static bool _try_writable (hb_blob_t *blob);
...@@ -507,6 +492,10 @@ _try_writable (hb_blob_t *blob) ...@@ -507,6 +492,10 @@ _try_writable (hb_blob_t *blob)
return true; return true;
} }
/*
* Mmap
*/
#if defined(_WIN32) || defined(__CYGWIN__) #if defined(_WIN32) || defined(__CYGWIN__)
#include <windows.h> #include <windows.h>
#include <io.h> #include <io.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册