diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-02 18:47:32 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-02 18:47:32 +0000 |
commit | dfbe9c1eb3d9fd172e7020f0e77be1dcd78079ab (patch) | |
tree | 43e0f79944df5ab8ace7c6dbde0838d8ddcf1717 /nuttx/mm | |
parent | dd2673f8ec1cb07aae5e94c44eaf1118491a8d64 (diff) | |
download | px4-nuttx-dfbe9c1eb3d9fd172e7020f0e77be1dcd78079ab.tar.gz px4-nuttx-dfbe9c1eb3d9fd172e7020f0e77be1dcd78079ab.tar.bz2 px4-nuttx-dfbe9c1eb3d9fd172e7020f0e77be1dcd78079ab.zip |
Port the mm/mm_test.c logic to examples/mm
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3330 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/mm')
-rw-r--r-- | nuttx/mm/mm_test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nuttx/mm/mm_test.c b/nuttx/mm/mm_test.c index 4e414d848..48f380221 100644 --- a/nuttx/mm/mm_test.c +++ b/nuttx/mm/mm_test.c @@ -1,7 +1,7 @@ /************************************************************************ * mm/mm_test.c * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -379,7 +379,7 @@ static void do_memaligns(void **mem, const int *size, const int *align, const in } } -static do_frees(void **mem, const int *size, const int *rand, int n) +static void do_frees(void **mem, const int *size, const int *rand, int n) { int sval; int i; @@ -387,7 +387,7 @@ static do_frees(void **mem, const int *size, const int *rand, int n) for (i = 0; i < n; i++) { - j = random2[i]; + j = rand[i]; printf("(%d)Releasing memory at %p (size=%d bytes)\n", i, mem[j], size[j]); mm_free(mem[j]); |