2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 #include "intuition_intern.h"
8 #include <exec/memory.h>
9 #include <proto/exec.h>
11 /*****************************************************************************
14 #include <intuition/intuition.h>
15 #include <proto/intuition.h>
17 AROS_LH3(APTR
, AllocRemember
,
20 AROS_LHA(struct Remember
**, rememberKey
, A0
),
21 AROS_LHA(ULONG
, size
, D0
),
22 AROS_LHA(ULONG
, flags
, D1
),
25 struct IntuitionBase
*, IntuitionBase
, 66, Intuition
)
28 Allocate some memory and remeber it in the Remember-List.
31 rememberKey - Store information in this list. Must be NULL for
33 size - How many bytes to allocate
34 flags - Attributes (see AllocMem())
37 Pointer to the allocated memory or NULL.
42 struct Remember *remkey;
44 AllocRemember(&remkey, BUFSIZE, MEMF_ANY);
45 FreeRemember(&remkey, TRUE);
55 *****************************************************************************/
59 struct Remember
*newKey
;
62 DEBUG_REMEMBER(dprintf("AllocRemember: Key 0x%lx Size 0x%lx Flags 0x%08lx\n",
63 rememberKey
, size
, flags
));
65 newKey
= AllocMem (sizeof (struct Remember
), MEMF_ANY
);
69 ptr
= AllocMem (size
, flags
);
73 newKey
->NextRemember
= *rememberKey
;
75 newKey
->RememberSize
= size
;
77 *rememberKey
= newKey
;
81 FreeMem (newKey
, sizeof (struct Remember
));
85 DEBUG_REMEMBER(dprintf("AllocRemember: Ptr 0x%lx\n", ptr
));