Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: cvs: firmware/test/memory config.h,1.4,1.5 defines.h,1.3,1.4 test.y,1.2,1.3
From: Alan Korr (alkorr_at_users.sourceforge.net)
Date: 2002-04-17


Update of /cvsroot/rockbox/firmware/test/memory
In directory usw-pr-cvs1:/tmp/cvs-serv5549

Modified Files:
        config.h defines.h test.y
Log Message:
some fixes

Index: config.h
===================================================================
RCS file: /cvsroot/rockbox/firmware/test/memory/config.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- config.h 17 Apr 2002 13:36:07 -0000 1.4
+++ config.h 17 Apr 2002 15:11:03 -0000 1.5
@@ -6,7 +6,6 @@
  * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
  * \/ \/ \/ \/ \/
  * $Id$
- *
  * Copyright (C) 2002 by Alan Korr
  *
  * All files in this archive are subject to the GNU General Public License.

Index: defines.h
===================================================================
RCS file: /cvsroot/rockbox/firmware/test/memory/defines.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- defines.h 17 Apr 2002 13:36:07 -0000 1.3
+++ defines.h 17 Apr 2002 15:11:03 -0000 1.4
@@ -6,7 +6,6 @@
  * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
  * \/ \/ \/ \/ \/
  * $Id$
- *
  * Copyright (C) 2002 by Alan Korr
  *
  * All files in this archive are subject to the GNU General Public License.

Index: test.y
===================================================================
RCS file: /cvsroot/rockbox/firmware/test/memory/test.y,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- test.y 16 Apr 2002 18:37:44 -0000 1.2
+++ test.y 17 Apr 2002 15:11:03 -0000 1.3
@@ -1,5 +1,6 @@
 %{
 #include "memory.h"
+#include "memory-page.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -63,7 +64,7 @@
 
 check
   : CHECK expression
- { memory_check (yylval); }
+ { __memory_check (yylval); }
   ;
 
 expression
@@ -112,21 +113,19 @@
 
 void allocate (int order)
   {
- extern char free_page[0];
     void *address;
     printf("\nallocating a page of %d bytes...",512<<order);
     if ((unsigned)order > 21)
       printf (" bad order !");
     else if ((address = memory_allocate_page (order)))
- printf (" page #%d allocated !",((char *)address - free_page) >> 9);
+ printf (" page #%d allocated !",((char *)address - (char *)__memory_free_page) >> 9);
     else
       printf (" cannot allocate a page !");
   }
 
 void release (int page)
   {
- extern char free_page[0];
- void *address = (void *)(free_page + (page << 9));
+ void *address = (void *)((char *)__memory_free_page + (page << 9));
     printf("\nreleasing page #%d...",page);
     if ((unsigned)page >= (2*1024*1024/512))
       printf (" bad page number !");
@@ -138,13 +137,12 @@
 
 void spy (int page)
   {
- extern char free_page[0];
- void *address = (void *)(free_page + (page << 9));
+ void *address = (void *)((char *)__memory_free_page + (page << 9));
     printf("\nspying page #%d...",page);
     if ((unsigned)page >= (2*1024*1024/512))
       printf (" bad page number !");
     else
- memory_spy_page (address);
+ __memory_spy_page (address);
   }
 
 void dump (void)
@@ -152,7 +150,7 @@
     int order;
     printf("\ndumping free pages list...");
     for (order = 0; order < 13; ++order)
- memory_dump (order);
+ __memory_dump (order);
   }
 
 int main ()



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa