#include <Memory_Pool.h>
Public Types | |
| enum | { FIRSTCALL_FIXED = 0, ALWAYS_FIXED = 1, NEVER_FIXED = 2 } |
Public Methods | |
| ACE_MMAP_Memory_Pool_Options (const void *base_addr=ACE_DEFAULT_BASE_ADDR, int use_fixed_addr=ALWAYS_FIXED, int write_each_page=1, off_t minimum_bytes=0, u_int flags=0, int guess_on_fault=1, LPSECURITY_ATTRIBUTES sa=0, mode_t file_mode=ACE_DEFAULT_FILE_PERMS) | |
Public Attributes | |
| const void * | base_addr_ |
| Base address of the memory-mapped backing store. More... | |
| int | use_fixed_addr_ |
| int | write_each_page_ |
| Should each page be written eagerly to avoid surprises later on? More... | |
| off_t | minimum_bytes_ |
| What the minimim bytes of the initial segment should be. More... | |
| u_int | flags_ |
| Any special flags that need to be used for <mmap>. More... | |
| int | guess_on_fault_ |
| LPSECURITY_ATTRIBUTES | sa_ |
| Pointer to a security attributes object. Only used on NT. More... | |
| mode_t | file_mode_ |
| File mode for mmaped file, if it is created. More... | |
This should be a nested class, but that breaks too many compilers.
Definition at line 395 of file Memory_Pool.h.
|
|
Definition at line 398 of file Memory_Pool.h.
00399 {
00400 /**
00401 * The base address from the first call to mmap will be used for subsequent
00402 * calls to mmap.
00403 */
00404 FIRSTCALL_FIXED = 0,
00405
00406 /**
00407 * The base address specified in base_addr will be used in all calls to
00408 * mmap.
00409 */
00410 ALWAYS_FIXED = 1,
00411
00412 /**
00413 * The base address will be selected by the OS for each call to mmap.
00414 * Caution should be used with this mode since a call that requires the
00415 * backing store to grow may change pointers that are cached by the
00416 * application.
00417 */
00418 NEVER_FIXED = 2
00419 };
|
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 454 of file Memory_Pool.cpp. References ACE_TRACE, ALWAYS_FIXED, base_addr_, FIRSTCALL_FIXED, mode_t, and use_fixed_addr_.
00462 : base_addr_ (base_addr), 00463 use_fixed_addr_ (use_fixed_addr), 00464 write_each_page_ (write_each_page), 00465 minimum_bytes_ (minimum_bytes), 00466 flags_ (flags), 00467 guess_on_fault_ (guess_on_fault), 00468 sa_ (sa), 00469 file_mode_ (file_mode) 00470 { 00471 ACE_TRACE ("ACE_MMAP_Memory_Pool_Options::ACE_MMAP_Memory_Pool_Options"); 00472 // for backwards compatability 00473 if (base_addr_ == 0 && use_fixed_addr_ == ALWAYS_FIXED) 00474 use_fixed_addr_ = FIRSTCALL_FIXED; 00475 00476 // HP-UX 11, 64-bit bug workaround. 00477 #if defined (__hpux) && defined (__LP64__) 00478 long temp = ACE_DEFAULT_BASE_ADDRL; 00479 base_addr_ = (void *) temp; 00480 #endif /* defined (__hpux) && defined (__LP64__) */ 00481 } |
|
|
Base address of the memory-mapped backing store.
Definition at line 432 of file Memory_Pool.h. Referenced by ACE_MMAP_Memory_Pool_Options. |
|
|
File mode for mmaped file, if it is created.
Definition at line 469 of file Memory_Pool.h. |
|
|
Any special flags that need to be used for <mmap>.
Definition at line 456 of file Memory_Pool.h. |
|
|
Try to remap without knowing the faulting address. This parameter is ignored on platforms that know the faulting address (UNIX with SI_ADDR and Win32). Definition at line 463 of file Memory_Pool.h. |
|
|
What the minimim bytes of the initial segment should be.
Definition at line 453 of file Memory_Pool.h. |
|
|
Pointer to a security attributes object. Only used on NT.
Definition at line 466 of file Memory_Pool.h. |
|
|
Determines whether we set <base_addr_> or if mmap(2) selects it FIRSTCALL_FIXED The base address from the first call to mmap will be used for subsequent calls to mmap ALWAYS_FIXED The base address specified in base_addr will be used in all calls to mmap. NEVER_FIXED The base address will be selected by the OS for each call to mmap. Caution should be used with this mode since a call that requires the backing store to grow may change pointers that are cached by the application. Definition at line 446 of file Memory_Pool.h. Referenced by ACE_MMAP_Memory_Pool_Options. |
|
|
Should each page be written eagerly to avoid surprises later on?
Definition at line 450 of file Memory_Pool.h. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002