diff options
Diffstat (limited to 'firmware/test/memory/memory-misc.c')
-rw-r--r-- | firmware/test/memory/memory-misc.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/firmware/test/memory/memory-misc.c b/firmware/test/memory/memory-misc.c deleted file mode 100644 index 765600765b..0000000000 --- a/firmware/test/memory/memory-misc.c +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 by Alan Korr | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | #include <memory.h> | ||
20 | #include "memory-page.h" | ||
21 | #if 0 | ||
22 | #include "memory-slab.h" | ||
23 | #endif | ||
24 | |||
25 | /* NOT VERY OPTIMIZED AT ALL BUT WE WILL DO IT WHEN PRIORITY COMES */ | ||
26 | void memory_copy (void *target,void const *source,unsigned int count) | ||
27 | { | ||
28 | while (count--) | ||
29 | *((char *)target)++ = *((char const *)source)++; | ||
30 | } | ||
31 | |||
32 | /* NOT VERY OPTIMIZED AT ALL BUT WE WILL DO IT WHEN PRIORITY COMES */ | ||
33 | void memory_set (void *target,int byte,unsigned int count) | ||
34 | { | ||
35 | while (count--) | ||
36 | *((char *)target)++ = (char)byte; | ||
37 | } | ||
38 | |||
39 | void memory_setup (void) | ||
40 | { | ||
41 | #if 1 | ||
42 | memory_set (__memory_free_page,0,MEMORY_TOTAL_BYTES); | ||
43 | memory_set (__memory_free_page_bin,0,MEMORY_TOTAL_ORDERS *sizeof (struct memory_free_page *)); | ||
44 | memory_set (__memory_free_page_order + 1,0,MEMORY_TOTAL_PAGES); | ||
45 | #endif | ||
46 | __memory_free_page_order[0] = MEMORY_TOTAL_ORDERS - 1; | ||
47 | __memory_free_page_bin[MEMORY_TOTAL_ORDERS - 1] = __memory_free_page; | ||
48 | } | ||