2 * Copyright (C) 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
3 * Helsinki University of Technology, Finland.
5 * Copyright (C) 2005 Neil Cafferkey
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
25 #include <exec/types.h>
27 #include <sys/malloc.h>
29 #include <api/amiga_api.h>
30 #include <api/allocdatabuffer.h>
32 BOOL
doAllocDataBuffer(struct DataBuffer
* DB
, int size
)
35 bsd_free(DB
->db_Addr
, M_TEMP
);
37 if ((DB
->db_Addr
= bsd_malloc(size
, M_TEMP
, M_WAITOK
)) == NULL
) {
45 VOID
freeDataBuffer(struct DataBuffer
* DB
)
48 bsd_free(DB
->db_Addr
, M_TEMP
);