summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2013-02-21 23:49:39 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2013-02-21 23:49:39 +0000
commita89148332f6d6c557c33a2bd1672950c401bdd8d (patch)
tree956f9eebdd8a4234231a3ef76496eff2d82a78df /amiga
parent28ddfb27c4a51ce23cb430b300c7b7e8af6375f6 (diff)
downloadnetsurf-a89148332f6d6c557c33a2bd1672950c401bdd8d.tar.gz
netsurf-a89148332f6d6c557c33a2bd1672950c401bdd8d.tar.bz2
Remove this; it's worse in real-life situations than the buggy newlib version.
Diffstat (limited to 'amiga')
-rwxr-xr-xamiga/alloc.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/amiga/alloc.c b/amiga/alloc.c
deleted file mode 100755
index 062efab6c..000000000
--- a/amiga/alloc.c
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <proto/exec.h>
-
-#ifdef AMIGA_NETSURF_REPLACE_ALLOC
-#define nsa_malloc malloc
-#define nsa_calloc calloc
-#define nsa_realloc realloc
-#define nsa_free free
-#endif
-
-void nsa_free(void *p) {
- if(p == NULL) return;
- UBYTE *mem = p - 4;
- FreeVec(mem);
-}
-void *nsa_malloc(size_t s) {
- UBYTE *mem = AllocVec(s + 4, MEMF_PRIVATE);
- *mem = s;
- return mem + 4;
-}
-void *nsa_calloc(size_t nelem, size_t nsize) {
- UBYTE *mem = AllocVec((nelem * nsize) + 4, MEMF_PRIVATE | MEMF_CLEAR);
- *mem = (nelem * nsize);
- return mem + 4;
-}
-void *nsa_realloc(void *p, size_t s) {
- void *newptr;
- ULONG old_size = *((UBYTE *)p - 4);
- newptr = nsa_malloc(s);
- memcpy(newptr, p, old_size);
- nsa_free(p);
- return newptr;
-}