summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Lubitz2007-08-06 03:36:35 +0200
committerHolger Lubitz2007-08-06 03:36:35 +0200
commit781547449515fcb66e264d5876e9d05ea49043f4 (patch)
treede255dec650ac21b552c04d9ce83578ef7cd4cdc
parentMerge branch 'master' of git://git.etherboot.org/scm/gpxe (diff)
downloadipxe-781547449515fcb66e264d5876e9d05ea49043f4.tar.gz
ipxe-781547449515fcb66e264d5876e9d05ea49043f4.tar.xz
ipxe-781547449515fcb66e264d5876e9d05ea49043f4.zip
Revert "malloc attribute changes"
wasn't meant for my local "master" branch ;) This reverts commit 373022108ba389fb3d50a3d50f9baf64c6c82171.
-rw-r--r--src/arch/i386/core/umalloc.c2
-rw-r--r--src/core/malloc.c4
-rw-r--r--src/crypto/cryptoLayer.h6
3 files changed, 2 insertions, 10 deletions
diff --git a/src/arch/i386/core/umalloc.c b/src/arch/i386/core/umalloc.c
index 5bad072e8..bfd62ef16 100644
--- a/src/arch/i386/core/umalloc.c
+++ b/src/arch/i386/core/umalloc.c
@@ -135,7 +135,6 @@ static void ecollect_free ( void ) {
* Calling realloc() with a new size of zero is a valid way to free a
* memory block.
*/
-__attribute__ ((malloc))
userptr_t urealloc ( userptr_t ptr, size_t new_size ) {
struct external_memory extmem;
userptr_t new = ptr;
@@ -209,7 +208,6 @@ userptr_t urealloc ( userptr_t ptr, size_t new_size ) {
*
* Memory is guaranteed to be aligned to a page boundary.
*/
-__attribute__ ((malloc))
userptr_t umalloc ( size_t size ) {
return urealloc ( UNULL, size );
}
diff --git a/src/core/malloc.c b/src/core/malloc.c
index 6b8add940..2d892f42d 100644
--- a/src/core/malloc.c
+++ b/src/core/malloc.c
@@ -95,7 +95,6 @@ static char heap[HEAP_SIZE] __attribute__ (( aligned ( __alignof__(void *) )));
*
* @c align must be a power of two. @c size may not be zero.
*/
-__attribute__ ((malloc))
void * alloc_memblock ( size_t size, size_t align ) {
struct memory_block *block;
size_t align_mask;
@@ -249,7 +248,6 @@ void free_memblock ( void *ptr, size_t size ) {
* Calling realloc() with a new size of zero is a valid way to free a
* memory block.
*/
-__attribute__ ((malloc))
void * realloc ( void *old_ptr, size_t new_size ) {
struct autosized_block *old_block;
struct autosized_block *new_block;
@@ -299,7 +297,6 @@ void * realloc ( void *old_ptr, size_t new_size ) {
* Allocates memory with no particular alignment requirement. @c ptr
* will be aligned to at least a multiple of sizeof(void*).
*/
-__attribute__ ((malloc))
void * malloc ( size_t size ) {
return realloc ( NULL, size );
}
@@ -329,7 +326,6 @@ void free ( void *ptr ) {
* This function name is non-standard, but pretty intuitive.
* zalloc(size) is always equivalent to calloc(1,size)
*/
-__attribute__ ((malloc))
void * zalloc ( size_t size ) {
void *data;
diff --git a/src/crypto/cryptoLayer.h b/src/crypto/cryptoLayer.h
index 916142984..538b84f20 100644
--- a/src/crypto/cryptoLayer.h
+++ b/src/crypto/cryptoLayer.h
@@ -31,14 +31,12 @@ typedef void psPool_t;
#define sslAssert( ... ) assert ( __VA_ARGS__ )
-static inline __attribute__ (( always_inline )) __attribute__ ((malloc))
-void *
+static inline __attribute__ (( always_inline )) void *
psMalloc ( psPool_t *pool __unused, size_t len ) {
return malloc ( len );
}
-static inline __attribute__ (( always_inline )) __attribute__ ((malloc))
-void *
+static inline __attribute__ (( always_inline )) void *
psRealloc ( void *ptr, size_t len ) {
return realloc ( ptr, len );
}