diff options
author | Christopher Faylor <me@cgf.cx> | 2011-05-30 20:09:29 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2011-05-30 20:09:29 +0400 |
commit | 6642f7daa369ede921ce92eb819f01dc58b18b30 (patch) | |
tree | 21a627aeca43a0dcc93353e22668e71fc259e658 /winsup/cygwin/dll_init.h | |
parent | 7123c8b1fd92c222613bb1b77ec67d69fbbb9791 (diff) |
* dll_init.cc (reserve_upto): Remove.
(release_upto): Ditto.
(dll_list::reserve_space): New function to reserve space needed by DLL_LOAD
dlls early in the fork process.
(dll_list::load_after_fork): Rewrite to use recursion to track reservations it
makes while trying to make dlls land where they belong.
(dll_list::load_after_fork_impl): New function used by load_after_fork.
(dll_list::alloc): Initialize image base field.
* dll_init.h (dll_list::prefered_base): New field.
(dll_list::reserve_space): Declare new function.
(dll_list::load_after_fork): Declare new function.
* fork.cc (frok::child): call dll_list::reserve_space early, so we can retry if
it fails.
Diffstat (limited to 'winsup/cygwin/dll_init.h')
-rw-r--r-- | winsup/cygwin/dll_init.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/dll_init.h b/winsup/cygwin/dll_init.h index ea3f628a2..bf0265303 100644 --- a/winsup/cygwin/dll_init.h +++ b/winsup/cygwin/dll_init.h @@ -56,6 +56,7 @@ struct dll dll** deps; PWCHAR modname; DWORD image_size; + void* preferred_base; WCHAR name[1]; void detach (); int init (); @@ -88,6 +89,8 @@ public: void detach (void *); void init (); void load_after_fork (HANDLE); + void reserve_space (); + void load_after_fork_impl (HANDLE, dll* which, int retries); dll *find_by_modname (const PWCHAR name); void populate_all_deps (); void populate_deps (dll* d); |