summaryrefslogtreecommitdiff
path: root/ace/Malloc.i
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-02-05 05:01:13 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-02-05 05:01:13 +0000
commite589686a7e0687a5713b8495c74e83a9752e57c4 (patch)
treee502ccaf24f415d15f301840b4d384145a93d2cb /ace/Malloc.i
parentf18e114a04aa1dc6412b16aae0d59141d9c863db (diff)
downloadATCD-e589686a7e0687a5713b8495c74e83a9752e57c4.tar.gz
foo
Diffstat (limited to 'ace/Malloc.i')
-rw-r--r--ace/Malloc.i38
1 files changed, 21 insertions, 17 deletions
diff --git a/ace/Malloc.i b/ace/Malloc.i
index 12ec718df4a..115f004f7c2 100644
--- a/ace/Malloc.i
+++ b/ace/Malloc.i
@@ -6,18 +6,22 @@
ACE_INLINE void *
ACE_New_Allocator::malloc (size_t nbytes)
{
- return new char[nbytes];
+ char *ptr;
+
+ ACE_NEW_RETURN (ptr, char[nbytes], 0);
+ return (void *) ptr;
}
ACE_INLINE void *
-ACE_New_Allocator::calloc (size_t nbytes, char initial_value)
+ACE_New_Allocator::calloc (size_t nbytes,
+ char initial_value)
{
- char *ptr = new char [nbytes];
-
- if (ptr != 0)
- ACE_OS::memset (ptr, initial_value, nbytes);
+ char *ptr;
+
+ ACE_NEW_RETURN (ptr, char[nbytes], 0);
- return 0;
+ ACE_OS::memset (ptr, initial_value, nbytes);
+ return (void *) ptr;
}
ACE_INLINE void
@@ -33,61 +37,61 @@ ACE_New_Allocator::remove (void)
}
ACE_INLINE int
-ACE_New_Allocator::bind (const char *name, void *pointer, int duplicates)
+ACE_New_Allocator::bind (const char *, void *, int)
{
return -1;
}
ACE_INLINE int
-ACE_New_Allocator::trybind (const char *name, void *&pointer)
+ACE_New_Allocator::trybind (const char *, void *&)
{
return -1;
}
ACE_INLINE int
-ACE_New_Allocator::find (const char *name, void *&pointer)
+ACE_New_Allocator::find (const char *, void *&)
{
return -1;
}
ACE_INLINE int
-ACE_New_Allocator::find (const char *name)
+ACE_New_Allocator::find (const char *)
{
return -1;
}
ACE_INLINE int
-ACE_New_Allocator::unbind (const char *name)
+ACE_New_Allocator::unbind (const char *)
{
return -1;
}
ACE_INLINE int
-ACE_New_Allocator::unbind (const char *name, void *&pointer)
+ACE_New_Allocator::unbind (const char *, void *&)
{
return -1;
}
ACE_INLINE int
-ACE_New_Allocator::sync (ssize_t len, int flags)
+ACE_New_Allocator::sync (ssize_t, int)
{
return -1;
}
ACE_INLINE int
-ACE_New_Allocator::sync (void *addr, size_t len, int flags)
+ACE_New_Allocator::sync (void *, size_t, int)
{
return -1;
}
ACE_INLINE int
-ACE_New_Allocator::protect (ssize_t len, int prot)
+ACE_New_Allocator::protect (ssize_t, int)
{
return -1;
}
ACE_INLINE int
-ACE_New_Allocator::protect (void *addr, size_t len, int prot)
+ACE_New_Allocator::protect (void *, size_t, int)
{
return -1;
}