Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_OS_Memory Class Reference

This class is a wrapper for dynamic memory operations. More...

#include <OS_Memory.h>

Inheritance diagram for ACE_OS_Memory:

Inheritance graph
[legend]
List of all members.

Static Public Methods

void * sbrk (int brk)
void * calloc (size_t elements, size_t sizeof_elements)
void * malloc (size_t)
void * realloc (void *, size_t)
void free (void *)

Detailed Description

This class is a wrapper for dynamic memory operations.

Definition at line 200 of file OS_Memory.h.


Member Function Documentation

void * ACE_OS_Memory::calloc size_t    elements,
size_t    sizeof_elements
[static]
 

Definition at line 23 of file OS_Memory.cpp.

References ACE_CALLOC_FUNC, and ACE_MALLOC_FUNC.

00024 {
00025 #if !defined (ACE_HAS_WINCE)
00026   return ACE_CALLOC_FUNC (elements, sizeof_elements);
00027 #else
00028   // @@ This will probably not work since it doesn't consider
00029   // alignment properly.
00030   return ACE_MALLOC_FUNC (elements * sizeof_elements);
00031 #endif /* ACE_HAS_WINCE */
00032 }

void ACE_OS_Memory::free void *    [static]
 

Definition at line 41 of file OS_Memory.cpp.

References ACE_FREE_FUNC, and ACE_MALLOC_T.

Referenced by ACE_ARGV::add, ACE_Static_Object_Lock::cleanup_lock, ACE_TLI_Acceptor::close, ACE_Dirent_Selector::close, ACE_OS_Dirent::closedir_emulation, ACE_ATM_QoS::construct_options, ACE_Sock_Connect::count_interfaces, ACE_Name_Options::database, ACE_OS::flock_destroy, ACE_ATM_Stream::get_vpi_vci, ACE_Lib_Find::ldfind, ACE_Local_Name_Space::list_type_entries_i, ACE_Local_Name_Space::list_types_i, ACE_Log_Msg::local_host, ACE_OS::mkdir, ACE_Name_Options::nameserver_host, ACE_Name_Options::namespace_dir, ACE_Log_Msg::open, ACE_Name_Binding::operator=, ACE_Name_Options::process_name, ACE_OS_Dirent::readdir_emulation, ACE_Condition::remove, ACE_Mutex::remove, ACE_Auto_String_Free::reset, ACE_OS_Dirent::scandir_emulation, ACE_OS::sema_destroy, ACE_SPIPE_Addr::set, ACE_INET_Addr::string_to_addr, ACE_Log_Msg::sync, ACE_ARGV::~ACE_ARGV, ACE_Configuration_Section_Key_Heap::~ACE_Configuration_Section_Key_Heap, ACE_Log_Msg::~ACE_Log_Msg, ACE_Malloc_FIFO_Iterator_T::~ACE_Malloc_FIFO_Iterator_T, ACE_Malloc_LIFO_Iterator_T::~ACE_Malloc_LIFO_Iterator_T, ACE_Name_Binding::~ACE_Name_Binding, ACE_Name_Options::~ACE_Name_Options, and ACE_Strategy_Acceptor::~ACE_Strategy_Acceptor.

00042 {
00043   ACE_FREE_FUNC (ACE_MALLOC_T (ptr));
00044 }

void * ACE_OS_Memory::malloc size_t    [static]
 

Definition at line 17 of file OS_Memory.cpp.

References ACE_MALLOC_FUNC.

Referenced by ACE_ATM_QoS::ACE_ATM_QoS, ACE_Name_Options::ACE_Name_Options, ACE_ATM_QoS::construct_options, ACE_ATM_Stream::get_vpi_vci, ACE_Static_Object_Lock::instance, ACE_Lib_Find::ldfind, ACE_OS::mkdir, ACE_OS_Dirent::readdir_emulation, ACE_OS_Dirent::scandir_emulation, ACE_OS_String::strdup, and ACE::strndup.

00018 {
00019   return ACE_MALLOC_FUNC (nbytes);
00020 }

void * ACE_OS_Memory::realloc void *   ,
size_t   
[static]
 

Definition at line 35 of file OS_Memory.cpp.

References ACE_MALLOC_T, and ACE_REALLOC_FUNC.

Referenced by ACE_OS_Dirent::scandir_emulation.

00036 {
00037   return ACE_REALLOC_FUNC (ACE_MALLOC_T (ptr), nbytes);
00038 }

ACE_INLINE void * ACE_OS_Memory::sbrk int    brk [static]
 

Definition at line 12 of file OS_Memory.inl.

References sbrk.

Referenced by ACE_Sbrk_Memory_Pool::acquire, and sbrk.

00013 {
00014 #if defined (ACE_LACKS_SBRK)
00015   ACE_UNUSED_ARG (brk);
00016   ACE_NOTSUP_RETURN (0);
00017 #else
00018   ACE_OSCALL_RETURN (::sbrk (brk), void *, 0);
00019 #endif /* VXWORKS */
00020 }


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:51:48 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002