Remove CONFIG_CAN_PASS_STRUCT
This is the companion to PR #766. It removes the CONFIG_CAN_PASS_STRUCT option as recommended by Issue #620 NuttX PR #766 depends on PR being in place but not vice versa. This PR should be merge-able without #766 and then PR #766 should also pass its checks.
This commit is contained in:
parent
95efbf7e62
commit
05f2253a33
@ -176,11 +176,7 @@ static void configdata_loopmemusage(void)
|
|||||||
{
|
{
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmafter = mallinfo();
|
g_mmafter = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&g_mmafter);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous loop */
|
/* Show the change from the previous loop */
|
||||||
|
|
||||||
@ -189,11 +185,7 @@ static void configdata_loopmemusage(void)
|
|||||||
|
|
||||||
/* Set up for the next test */
|
/* Set up for the next test */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmprevious = g_mmafter;
|
g_mmprevious = g_mmafter;
|
||||||
#else
|
|
||||||
memcpy(&g_mmprevious, &g_mmafter, sizeof(struct mallinfo));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -203,11 +195,8 @@ static void configdata_loopmemusage(void)
|
|||||||
|
|
||||||
static void configdata_endmemusage(void)
|
static void configdata_endmemusage(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmafter = mallinfo();
|
g_mmafter = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&g_mmafter);
|
|
||||||
#endif
|
|
||||||
printf("\nFinal memory usage:\n");
|
printf("\nFinal memory usage:\n");
|
||||||
configdata_showmemusage(&g_mmbefore, &g_mmafter);
|
configdata_showmemusage(&g_mmbefore, &g_mmafter);
|
||||||
|
|
||||||
@ -679,11 +668,7 @@ int main(int argc, FAR char *argv[])
|
|||||||
|
|
||||||
/* Initialize the before memory values */
|
/* Initialize the before memory values */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmbefore = mallinfo();
|
g_mmbefore = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&g_mmbefore);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Loop seveal times ... create some config data items, delete them
|
/* Loop seveal times ... create some config data items, delete them
|
||||||
* randomly, verify them randomly, add new config items.
|
* randomly, verify them randomly, add new config items.
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* examples/elf/elf_main.c
|
* examples/elf/elf_main.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012, 2017-2018 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -179,11 +164,7 @@ static void mm_update(FAR unsigned int *previous, FAR const char *msg)
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -204,11 +185,7 @@ static void mm_initmonitor(void)
|
|||||||
{
|
{
|
||||||
struct mallinfo mmcurrent;
|
struct mallinfo mmcurrent;
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_mminitial = mmcurrent.uordblks;
|
g_mminitial = mmcurrent.uordblks;
|
||||||
g_mmstep = mmcurrent.uordblks;
|
g_mmstep = mmcurrent.uordblks;
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* examples/posix_spawn/spawn_main.c
|
* examples/posix_spawn/spawn_main.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013, 2018 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -172,11 +157,7 @@ static void mm_update(FAR unsigned int *previous, FAR const char *msg)
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -197,11 +178,7 @@ static void mm_initmonitor(void)
|
|||||||
{
|
{
|
||||||
struct mallinfo mmcurrent;
|
struct mallinfo mmcurrent;
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_mminitial = mmcurrent.uordblks;
|
g_mminitial = mmcurrent.uordblks;
|
||||||
g_mmstep = mmcurrent.uordblks;
|
g_mmstep = mmcurrent.uordblks;
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* examples/stat/stat_main.c
|
* examples/stat/stat_main.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008, 2017 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -78,11 +63,7 @@ static void stepusage(void)
|
|||||||
{
|
{
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmafter = mallinfo();
|
g_mmafter = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&g_mmafter);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous loop */
|
/* Show the change from the previous loop */
|
||||||
|
|
||||||
@ -90,20 +71,12 @@ static void stepusage(void)
|
|||||||
|
|
||||||
/* Set up for the next test */
|
/* Set up for the next test */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmprevious = g_mmafter;
|
g_mmprevious = g_mmafter;
|
||||||
#else
|
|
||||||
memcpy(&g_mmprevious, &g_mmafter, sizeof(struct mallinfo));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void endusage(void)
|
static void endusage(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmafter = mallinfo();
|
g_mmafter = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&g_mmafter);
|
|
||||||
#endif
|
|
||||||
showusage(&g_mmbefore, &g_mmafter, "End-of-test memory leak");
|
showusage(&g_mmbefore, &g_mmafter, "End-of-test memory leak");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -251,13 +224,8 @@ int main(int argc, FAR char *argv[])
|
|||||||
|
|
||||||
/* Set up memory monitoring */
|
/* Set up memory monitoring */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
g_mmbefore = mallinfo();
|
||||||
g_mmbefore = mallinfo();
|
|
||||||
g_mmprevious = g_mmbefore;
|
g_mmprevious = g_mmbefore;
|
||||||
#else
|
|
||||||
mallinfo(&g_mmbefore);
|
|
||||||
memcpy(&g_mmprevious, &g_mmbefore, sizeof(struct mallinfo));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Try stat first */
|
/* Try stat first */
|
||||||
|
|
||||||
|
@ -97,17 +97,16 @@ bool usrsocktest_test_failed = false;
|
|||||||
|
|
||||||
static void get_mallinfo(struct mallinfo *mem)
|
static void get_mallinfo(struct mallinfo *mem)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
*mem = mallinfo();
|
*mem = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(mem);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_mallinfo(const struct mallinfo *mem, const char *title)
|
static void print_mallinfo(const struct mallinfo *mem, const char *title)
|
||||||
{
|
{
|
||||||
if (title)
|
if (title)
|
||||||
printf("%s:\n", title);
|
{
|
||||||
|
printf("%s:\n", title);
|
||||||
|
}
|
||||||
|
|
||||||
printf(" %11s%11s%11s%11s\n", "total", "used", "free", "largest");
|
printf(" %11s%11s%11s%11s\n", "total", "used", "free", "largest");
|
||||||
printf("Mem: %11d%11d%11d%11d\n",
|
printf("Mem: %11d%11d%11d%11d\n",
|
||||||
mem->arena, mem->uordblks, mem->fordblks, mem->mxordblk);
|
mem->arena, mem->uordblks, mem->fordblks, mem->mxordblk);
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// apps/graphics/nxwidgets/UnitTests/CButtonArray/cbuttonarray_main.cxx
|
// apps/graphics/nxwidgets/UnitTests/CButtonArray/cbuttonarray_main.cxx
|
||||||
//
|
//
|
||||||
// Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
// Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
// Author: Gregory Nutt <gnutt@nuttx.org>
|
// contributor license agreements. See the NOTICE file distributed with
|
||||||
|
// this work for additional information regarding copyright ownership. The
|
||||||
|
// ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance with the
|
||||||
|
// License. You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// modification, are permitted provided that the following conditions
|
|
||||||
// are met:
|
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// notice, this list of conditions and the following disclaimer.
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
// notice, this list of conditions and the following disclaimer in
|
// License for the specific language governing permissions and limitations
|
||||||
// the documentation and/or other materials provided with the
|
// under the License.
|
||||||
// distribution.
|
|
||||||
// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
|
|
||||||
// me be used to endorse or promote products derived from this software
|
|
||||||
// without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
// POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -99,11 +84,7 @@ static void updateMemoryUsage(unsigned int previous,
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -129,11 +110,7 @@ static void initMemoryUsage(void)
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_mmInitial = mmcurrent.uordblks;
|
g_mmInitial = mmcurrent.uordblks;
|
||||||
g_mmPrevious = mmcurrent.uordblks;
|
g_mmPrevious = mmcurrent.uordblks;
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// apps/graphics/nxwidgets/UnitTests/CCheckBox/ccheckbox_main.cxx
|
// apps/graphics/nxwidgets/UnitTests/CCheckBox/ccheckbox_main.cxx
|
||||||
//
|
//
|
||||||
// Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
// Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
// Author: Gregory Nutt <gnutt@nuttx.org>
|
// contributor license agreements. See the NOTICE file distributed with
|
||||||
|
// this work for additional information regarding copyright ownership. The
|
||||||
|
// ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance with the
|
||||||
|
// License. You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// modification, are permitted provided that the following conditions
|
|
||||||
// are met:
|
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// notice, this list of conditions and the following disclaimer.
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
// notice, this list of conditions and the following disclaimer in
|
// License for the specific language governing permissions and limitations
|
||||||
// the documentation and/or other materials provided with the
|
// under the License.
|
||||||
// distribution.
|
|
||||||
// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
|
|
||||||
// me be used to endorse or promote products derived from this software
|
|
||||||
// without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
// POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -90,11 +75,7 @@ static void updateMemoryUsage(unsigned int previous,
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -117,11 +98,7 @@ static void initMemoryUsage(void)
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_mmInitial = mmcurrent.uordblks;
|
g_mmInitial = mmcurrent.uordblks;
|
||||||
g_mmprevious = mmcurrent.uordblks;
|
g_mmprevious = mmcurrent.uordblks;
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// apps/graphics/nxwidgets/UnitTests/CGlyphButton/cglyphbutton_main.cxx
|
// apps/graphics/nxwidgets/UnitTests/CGlyphButton/cglyphbutton_main.cxx
|
||||||
//
|
//
|
||||||
// Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
// Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
// Author: Gregory Nutt <gnutt@nuttx.org>
|
// contributor license agreements. See the NOTICE file distributed with
|
||||||
|
// this work for additional information regarding copyright ownership. The
|
||||||
|
// ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance with the
|
||||||
|
// License. You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// modification, are permitted provided that the following conditions
|
|
||||||
// are met:
|
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// notice, this list of conditions and the following disclaimer.
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
// notice, this list of conditions and the following disclaimer in
|
// License for the specific language governing permissions and limitations
|
||||||
// the documentation and/or other materials provided with the
|
// under the License.
|
||||||
// distribution.
|
|
||||||
// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
|
|
||||||
// me be used to endorse or promote products derived from this software
|
|
||||||
// without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
// POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -89,11 +74,7 @@ static void updateMemoryUsage(unsigned int previous,
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -116,11 +97,7 @@ static void initMemoryUsage(void)
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_mmInitial = mmcurrent.uordblks;
|
g_mmInitial = mmcurrent.uordblks;
|
||||||
g_mmprevious = mmcurrent.uordblks;
|
g_mmprevious = mmcurrent.uordblks;
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// apps/graphics/nxwidgets/UnitTests/CGlyphSliderHorizontal/cglyphsliderhorizontal_main.cxx
|
// apps/graphics/nxwidgets/UnitTests/CGlyphSliderHorizontal/cglyphsliderhorizontal_main.cxx
|
||||||
//
|
//
|
||||||
// Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
|
// Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
// Author: Gregory Nutt <gnutt@nuttx.org>
|
// contributor license agreements. See the NOTICE file distributed with
|
||||||
|
// this work for additional information regarding copyright ownership. The
|
||||||
|
// ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance with the
|
||||||
|
// License. You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// modification, are permitted provided that the following conditions
|
|
||||||
// are met:
|
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// notice, this list of conditions and the following disclaimer.
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
// notice, this list of conditions and the following disclaimer in
|
// License for the specific language governing permissions and limitations
|
||||||
// the documentation and/or other materials provided with the
|
// under the License.
|
||||||
// distribution.
|
|
||||||
// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
|
|
||||||
// me be used to endorse or promote products derived from this software
|
|
||||||
// without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
// POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -90,11 +75,7 @@ static void updateMemoryUsage(unsigned int previous,
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -117,11 +98,7 @@ static void initMemoryUsage(void)
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_mmInitial = mmcurrent.uordblks;
|
g_mmInitial = mmcurrent.uordblks;
|
||||||
g_mmprevious = mmcurrent.uordblks;
|
g_mmprevious = mmcurrent.uordblks;
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// apps/graphics/nxwidgets/UnitTests/CImage/cimage_main.cxx
|
// apps/graphics/nxwidgets/UnitTests/CImage/cimage_main.cxx
|
||||||
//
|
//
|
||||||
// Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
// Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
// Author: Gregory Nutt <gnutt@nuttx.org>
|
// contributor license agreements. See the NOTICE file distributed with
|
||||||
|
// this work for additional information regarding copyright ownership. The
|
||||||
|
// ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance with the
|
||||||
|
// License. You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// modification, are permitted provided that the following conditions
|
|
||||||
// are met:
|
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// notice, this list of conditions and the following disclaimer.
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
// notice, this list of conditions and the following disclaimer in
|
// License for the specific language governing permissions and limitations
|
||||||
// the documentation and/or other materials provided with the
|
// under the License.
|
||||||
// distribution.
|
|
||||||
// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
|
|
||||||
// me be used to endorse or promote products derived from this software
|
|
||||||
// without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
// POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -106,11 +91,7 @@ static void updateMemoryUsage(FAR struct mallinfo *previous,
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -119,11 +100,7 @@ static void updateMemoryUsage(FAR struct mallinfo *previous,
|
|||||||
|
|
||||||
/* Set up for the next test */
|
/* Set up for the next test */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmprevious = mmcurrent;
|
g_mmprevious = mmcurrent;
|
||||||
#else
|
|
||||||
memcpy(&g_mmprevious, &mmcurrent, sizeof(struct mallinfo));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@ -132,13 +109,8 @@ static void updateMemoryUsage(FAR struct mallinfo *previous,
|
|||||||
|
|
||||||
static void initMemoryUsage(void)
|
static void initMemoryUsage(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
g_mmInitial = mallinfo();
|
||||||
g_mmInitial = mallinfo();
|
|
||||||
g_mmprevious = g_mmInitial;
|
g_mmprevious = g_mmInitial;
|
||||||
#else
|
|
||||||
mallinfo(&g_mmInitial);
|
|
||||||
memcpy(&g_mmprevious, &g_mmInitial, sizeof(struct mallinfo));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// apps/graphics/nxwidgets/UnitTests/CKeypad/ckeypad_main.cxx
|
// apps/graphics/nxwidgets/UnitTests/CKeypad/ckeypad_main.cxx
|
||||||
//
|
//
|
||||||
// Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
// Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
// Author: Gregory Nutt <gnutt@nuttx.org>
|
// contributor license agreements. See the NOTICE file distributed with
|
||||||
|
// this work for additional information regarding copyright ownership. The
|
||||||
|
// ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance with the
|
||||||
|
// License. You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// modification, are permitted provided that the following conditions
|
|
||||||
// are met:
|
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// notice, this list of conditions and the following disclaimer.
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
// notice, this list of conditions and the following disclaimer in
|
// License for the specific language governing permissions and limitations
|
||||||
// the documentation and/or other materials provided with the
|
// under the License.
|
||||||
// distribution.
|
|
||||||
// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
|
|
||||||
// me be used to endorse or promote products derived from this software
|
|
||||||
// without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
// POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -89,11 +74,7 @@ static void updateMemoryUsage(unsigned int previous,
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -119,11 +100,7 @@ static void initMemoryUsage(void)
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_mmInitial = mmcurrent.uordblks;
|
g_mmInitial = mmcurrent.uordblks;
|
||||||
g_mmPrevious = mmcurrent.uordblks;
|
g_mmPrevious = mmcurrent.uordblks;
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// apps/graphics/nxwidgets/UnitTests/CLatchButtonArray/clatchbuttonarry_main.cxx
|
// apps/graphics/nxwidgets/UnitTests/CLatchButtonArray/clatchbuttonarry_main.cxx
|
||||||
//
|
//
|
||||||
// Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
// Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
// Author: Gregory Nutt <gnutt@nuttx.org>
|
// contributor license agreements. See the NOTICE file distributed with
|
||||||
|
// this work for additional information regarding copyright ownership. The
|
||||||
|
// ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance with the
|
||||||
|
// License. You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// modification, are permitted provided that the following conditions
|
|
||||||
// are met:
|
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// notice, this list of conditions and the following disclaimer.
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
// notice, this list of conditions and the following disclaimer in
|
// License for the specific language governing permissions and limitations
|
||||||
// the documentation and/or other materials provided with the
|
// under the License.
|
||||||
// distribution.
|
|
||||||
// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
|
|
||||||
// me be used to endorse or promote products derived from this software
|
|
||||||
// without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
// POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -125,11 +110,7 @@ static void updateMemoryUsage(unsigned int previous,
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -155,11 +136,7 @@ static void initMemoryUsage(void)
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_mmInitial = mmcurrent.uordblks;
|
g_mmInitial = mmcurrent.uordblks;
|
||||||
g_mmPrevious = mmcurrent.uordblks;
|
g_mmPrevious = mmcurrent.uordblks;
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// apps/graphics/nxwidgets/UnitTests/CListBox/clistbox_main.cxx
|
// apps/graphics/nxwidgets/UnitTests/CListBox/clistbox_main.cxx
|
||||||
//
|
//
|
||||||
// Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
// Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
// Author: Gregory Nutt <gnutt@nuttx.org>
|
// contributor license agreements. See the NOTICE file distributed with
|
||||||
|
// this work for additional information regarding copyright ownership. The
|
||||||
|
// ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance with the
|
||||||
|
// License. You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// modification, are permitted provided that the following conditions
|
|
||||||
// are met:
|
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// notice, this list of conditions and the following disclaimer.
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
// notice, this list of conditions and the following disclaimer in
|
// License for the specific language governing permissions and limitations
|
||||||
// the documentation and/or other materials provided with the
|
// under the License.
|
||||||
// distribution.
|
|
||||||
// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
|
|
||||||
// me be used to endorse or promote products derived from this software
|
|
||||||
// without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
// POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -125,11 +110,7 @@ static void updateMemoryUsage(unsigned int previous,
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -155,11 +136,7 @@ static void initMemoryUsage(void)
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_mmInitial = mmcurrent.uordblks;
|
g_mmInitial = mmcurrent.uordblks;
|
||||||
g_mmPrevious = mmcurrent.uordblks;
|
g_mmPrevious = mmcurrent.uordblks;
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// apps/graphics/nxwidgets/UnitTests/CProgressBar/cprogressbar_main.cxx
|
// apps/graphics/nxwidgets/UnitTests/CProgressBar/cprogressbar_main.cxx
|
||||||
//
|
//
|
||||||
// Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
// Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
// Author: Gregory Nutt <gnutt@nuttx.org>
|
// contributor license agreements. See the NOTICE file distributed with
|
||||||
|
// this work for additional information regarding copyright ownership. The
|
||||||
|
// ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance with the
|
||||||
|
// License. You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// modification, are permitted provided that the following conditions
|
|
||||||
// are met:
|
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// notice, this list of conditions and the following disclaimer.
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
// notice, this list of conditions and the following disclaimer in
|
// License for the specific language governing permissions and limitations
|
||||||
// the documentation and/or other materials provided with the
|
// under the License.
|
||||||
// distribution.
|
|
||||||
// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
|
|
||||||
// me be used to endorse or promote products derived from this software
|
|
||||||
// without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
// POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -90,11 +75,7 @@ static void updateMemoryUsage(unsigned int previous,
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -117,11 +98,7 @@ static void initMemoryUsage(void)
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_mmInitial = mmcurrent.uordblks;
|
g_mmInitial = mmcurrent.uordblks;
|
||||||
g_mmprevious = mmcurrent.uordblks;
|
g_mmprevious = mmcurrent.uordblks;
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// apps/graphics/nxwidgets/UnitTests/CRadioButton/cradiobutton_main.cxx
|
// apps/graphics/nxwidgets/UnitTests/CRadioButton/cradiobutton_main.cxx
|
||||||
//
|
//
|
||||||
// Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
// Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
// Author: Gregory Nutt <gnutt@nuttx.org>
|
// contributor license agreements. See the NOTICE file distributed with
|
||||||
|
// this work for additional information regarding copyright ownership. The
|
||||||
|
// ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance with the
|
||||||
|
// License. You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// modification, are permitted provided that the following conditions
|
|
||||||
// are met:
|
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// notice, this list of conditions and the following disclaimer.
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
// notice, this list of conditions and the following disclaimer in
|
// License for the specific language governing permissions and limitations
|
||||||
// the documentation and/or other materials provided with the
|
// under the License.
|
||||||
// distribution.
|
|
||||||
// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
|
|
||||||
// me be used to endorse or promote products derived from this software
|
|
||||||
// without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
// POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -90,11 +75,7 @@ static void updateMemoryUsage(unsigned int previous,
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -117,11 +98,7 @@ static void initMemoryUsage(void)
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_mmInitial = mmcurrent.uordblks;
|
g_mmInitial = mmcurrent.uordblks;
|
||||||
g_mmprevious = mmcurrent.uordblks;
|
g_mmprevious = mmcurrent.uordblks;
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// apps/graphics/nxwidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontal_main.cxx
|
// apps/graphics/nxwidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontal_main.cxx
|
||||||
//
|
//
|
||||||
// Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
// Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
// Author: Gregory Nutt <gnutt@nuttx.org>
|
// contributor license agreements. See the NOTICE file distributed with
|
||||||
|
// this work for additional information regarding copyright ownership. The
|
||||||
|
// ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance with the
|
||||||
|
// License. You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// modification, are permitted provided that the following conditions
|
|
||||||
// are met:
|
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// notice, this list of conditions and the following disclaimer.
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
// notice, this list of conditions and the following disclaimer in
|
// License for the specific language governing permissions and limitations
|
||||||
// the documentation and/or other materials provided with the
|
// under the License.
|
||||||
// distribution.
|
|
||||||
// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
|
|
||||||
// me be used to endorse or promote products derived from this software
|
|
||||||
// without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
// POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -90,11 +75,7 @@ static void updateMemoryUsage(unsigned int previous,
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -117,11 +98,7 @@ static void initMemoryUsage(void)
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_mmInitial = mmcurrent.uordblks;
|
g_mmInitial = mmcurrent.uordblks;
|
||||||
g_mmprevious = mmcurrent.uordblks;
|
g_mmprevious = mmcurrent.uordblks;
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// apps/graphics/nxwidgets/UnitTests/CScrollbarVertical/cscrollbarvertical_main.cxx
|
// apps/graphics/nxwidgets/UnitTests/CScrollbarVertical/cscrollbarvertical_main.cxx
|
||||||
//
|
//
|
||||||
// Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
// Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
// Author: Gregory Nutt <gnutt@nuttx.org>
|
// contributor license agreements. See the NOTICE file distributed with
|
||||||
|
// this work for additional information regarding copyright ownership. The
|
||||||
|
// ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance with the
|
||||||
|
// License. You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// modification, are permitted provided that the following conditions
|
|
||||||
// are met:
|
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// notice, this list of conditions and the following disclaimer.
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
// notice, this list of conditions and the following disclaimer in
|
// License for the specific language governing permissions and limitations
|
||||||
// the documentation and/or other materials provided with the
|
// under the License.
|
||||||
// distribution.
|
|
||||||
// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
|
|
||||||
// me be used to endorse or promote products derived from this software
|
|
||||||
// without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
// POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -90,11 +75,7 @@ static void updateMemoryUsage(unsigned int previous,
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -117,11 +98,7 @@ static void initMemoryUsage(void)
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_mmInitial = mmcurrent.uordblks;
|
g_mmInitial = mmcurrent.uordblks;
|
||||||
g_mmprevious = mmcurrent.uordblks;
|
g_mmprevious = mmcurrent.uordblks;
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// apps/graphics/nxwidgets/UnitTests/CSliderHorizontal/csliderhorizontal_main.cxx
|
// apps/graphics/nxwidgets/UnitTests/CSliderHorizontal/csliderhorizontal_main.cxx
|
||||||
//
|
//
|
||||||
// Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
// Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
// Author: Gregory Nutt <gnutt@nuttx.org>
|
// contributor license agreements. See the NOTICE file distributed with
|
||||||
|
// this work for additional information regarding copyright ownership. The
|
||||||
|
// ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance with the
|
||||||
|
// License. You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// modification, are permitted provided that the following conditions
|
|
||||||
// are met:
|
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// notice, this list of conditions and the following disclaimer.
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
// notice, this list of conditions and the following disclaimer in
|
// License for the specific language governing permissions and limitations
|
||||||
// the documentation and/or other materials provided with the
|
// under the License.
|
||||||
// distribution.
|
|
||||||
// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
|
|
||||||
// me be used to endorse or promote products derived from this software
|
|
||||||
// without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
// POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -90,11 +75,7 @@ static void updateMemoryUsage(unsigned int previous,
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -117,11 +98,7 @@ static void initMemoryUsage(void)
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_mmInitial = mmcurrent.uordblks;
|
g_mmInitial = mmcurrent.uordblks;
|
||||||
g_mmprevious = mmcurrent.uordblks;
|
g_mmprevious = mmcurrent.uordblks;
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// apps/graphics/nxwidgets/UnitTests/CSliderVertical/cslidervertical_main.cxx
|
// apps/graphics/nxwidgets/UnitTests/CSliderVertical/cslidervertical_main.cxx
|
||||||
//
|
//
|
||||||
// Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
// Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
// Author: Gregory Nutt <gnutt@nuttx.org>
|
// contributor license agreements. See the NOTICE file distributed with
|
||||||
|
// this work for additional information regarding copyright ownership. The
|
||||||
|
// ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance with the
|
||||||
|
// License. You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// modification, are permitted provided that the following conditions
|
|
||||||
// are met:
|
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// notice, this list of conditions and the following disclaimer.
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
// notice, this list of conditions and the following disclaimer in
|
// License for the specific language governing permissions and limitations
|
||||||
// the documentation and/or other materials provided with the
|
// under the License.
|
||||||
// distribution.
|
|
||||||
// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
|
|
||||||
// me be used to endorse or promote products derived from this software
|
|
||||||
// without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
// POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -90,11 +75,7 @@ static void updateMemoryUsage(unsigned int previous,
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -117,11 +98,7 @@ static void initMemoryUsage(void)
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mmcurrent = mallinfo();
|
mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_mmInitial = mmcurrent.uordblks;
|
g_mmInitial = mmcurrent.uordblks;
|
||||||
g_mmprevious = mmcurrent.uordblks;
|
g_mmprevious = mmcurrent.uordblks;
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* netutils/thttpd/thttpd_alloc.c
|
* netutils/thttpd/thttpd_alloc.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -87,11 +72,8 @@ void httpd_memstats(void)
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
mm = mallinfo();
|
mm = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&mm);
|
|
||||||
#endif
|
|
||||||
ninfo("arena: %08x ordblks: %08x mxordblk: %08x uordblks: %08x fordblks: %08x\n",
|
ninfo("arena: %08x ordblks: %08x mxordblk: %08x uordblks: %08x fordblks: %08x\n",
|
||||||
mm.arena, mm.ordblks, mm.mxordblk, mm.uordblks, mm.fordblks);
|
mm.arena, mm.ordblks, mm.mxordblk, mm.uordblks, mm.fordblks);
|
||||||
}
|
}
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* system/composite/composite_main.c
|
* system/composite/composite_main.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012-2017 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -124,11 +109,7 @@ static void check_test_memory_usage(FAR const char *msg)
|
|||||||
{
|
{
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_composite.mmcurrent = mallinfo();
|
g_composite.mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&g_composite.mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -137,11 +118,7 @@ static void check_test_memory_usage(FAR const char *msg)
|
|||||||
|
|
||||||
/* Set up for the next test */
|
/* Set up for the next test */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_composite.mmprevious = g_composite.mmcurrent;
|
g_composite.mmprevious = g_composite.mmcurrent;
|
||||||
#else
|
|
||||||
memcpy(&g_composite.mmprevious, &g_composite.mmcurrent, sizeof(struct mallinfo));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# define check_test_memory_usage(msg)
|
# define check_test_memory_usage(msg)
|
||||||
@ -156,11 +133,7 @@ static void final_memory_usage(FAR const char *msg)
|
|||||||
{
|
{
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_composite.mmcurrent = mallinfo();
|
g_composite.mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&g_composite.mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -443,13 +416,8 @@ int main(int argc, FAR char *argv[])
|
|||||||
usbtrace_enable(TRACE_BITSET);
|
usbtrace_enable(TRACE_BITSET);
|
||||||
|
|
||||||
#ifdef CONFIG_SYSTEM_COMPOSITE_DEBUGMM
|
#ifdef CONFIG_SYSTEM_COMPOSITE_DEBUGMM
|
||||||
# ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_composite.mmstart = mallinfo();
|
g_composite.mmstart = mallinfo();
|
||||||
g_composite.mmprevious = g_composite.mmstart;
|
g_composite.mmprevious = g_composite.mmstart;
|
||||||
# else
|
|
||||||
mallinfo(&g_composite.mmstart);
|
|
||||||
memcpy(&g_composite.mmprevious, &g_composite.mmstart, sizeof(struct mallinfo));
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Perform architecture-specific initialization */
|
/* Perform architecture-specific initialization */
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* system/usbmsc/usbmsc_main.c
|
* system/usbmsc/usbmsc_main.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2012, 2016 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -149,11 +134,7 @@ static void check_test_memory_usage(FAR const char *msg)
|
|||||||
{
|
{
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_usbmsc.mmcurrent = mallinfo();
|
g_usbmsc.mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&g_usbmsc.mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -162,11 +143,7 @@ static void check_test_memory_usage(FAR const char *msg)
|
|||||||
|
|
||||||
/* Set up for the next test */
|
/* Set up for the next test */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_usbmsc.mmprevious = g_usbmsc.mmcurrent;
|
g_usbmsc.mmprevious = g_usbmsc.mmcurrent;
|
||||||
#else
|
|
||||||
memcpy(&g_usbmsc.mmprevious, &g_usbmsc.mmcurrent, sizeof(struct mallinfo));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# define check_test_memory_usage(msg)
|
# define check_test_memory_usage(msg)
|
||||||
@ -181,11 +158,7 @@ static void final_memory_usage(FAR const char *msg)
|
|||||||
{
|
{
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_usbmsc.mmcurrent = mallinfo();
|
g_usbmsc.mmcurrent = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&g_usbmsc.mmcurrent);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -455,13 +428,8 @@ int main(int argc, FAR char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SYSTEM_USBMSC_DEBUGMM
|
#ifdef CONFIG_SYSTEM_USBMSC_DEBUGMM
|
||||||
# ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_usbmsc.mmstart = mallinfo();
|
g_usbmsc.mmstart = mallinfo();
|
||||||
g_usbmsc.mmprevious = g_usbmsc.mmstart;
|
g_usbmsc.mmprevious = g_usbmsc.mmstart;
|
||||||
# else
|
|
||||||
mallinfo(&g_usbmsc.mmstart);
|
|
||||||
memcpy(&g_usbmsc.mmprevious, &g_usbmsc.mmstart, sizeof(struct mallinfo));
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize USB trace output IDs */
|
/* Initialize USB trace output IDs */
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* include/nuttx/compiler.h
|
* include/nuttx/compiler.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013, 2017 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -241,10 +226,6 @@
|
|||||||
# define CONFIG_HAVE_DOUBLE 1
|
# define CONFIG_HAVE_DOUBLE 1
|
||||||
# define CONFIG_HAVE_LONG_DOUBLE 1
|
# define CONFIG_HAVE_LONG_DOUBLE 1
|
||||||
|
|
||||||
/* Structures and unions can be assigned and passed as values */
|
|
||||||
|
|
||||||
# define CONFIG_CAN_PASS_STRUCTS 1
|
|
||||||
|
|
||||||
/* SDCC-specific definitions ************************************************/
|
/* SDCC-specific definitions ************************************************/
|
||||||
|
|
||||||
#elif defined(SDCC)
|
#elif defined(SDCC)
|
||||||
@ -352,12 +333,6 @@
|
|||||||
# undef CONFIG_HAVE_DOUBLE
|
# undef CONFIG_HAVE_DOUBLE
|
||||||
# undef CONFIG_HAVE_LONG_DOUBLE
|
# undef CONFIG_HAVE_LONG_DOUBLE
|
||||||
|
|
||||||
/* Structures and unions cannot be passed as values or used
|
|
||||||
* in assignments.
|
|
||||||
*/
|
|
||||||
|
|
||||||
# undef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
|
|
||||||
/* Zilog-specific definitions ***********************************************/
|
/* Zilog-specific definitions ***********************************************/
|
||||||
|
|
||||||
#elif defined(__ZILOG__)
|
#elif defined(__ZILOG__)
|
||||||
@ -469,10 +444,6 @@
|
|||||||
# undef CONFIG_HAVE_DOUBLE
|
# undef CONFIG_HAVE_DOUBLE
|
||||||
# undef CONFIG_HAVE_LONG_DOUBLE
|
# undef CONFIG_HAVE_LONG_DOUBLE
|
||||||
|
|
||||||
/* Structures and unions can be assigned and passed as values */
|
|
||||||
|
|
||||||
# define CONFIG_CAN_PASS_STRUCTS 1
|
|
||||||
|
|
||||||
/* ICCARM-specific definitions ***********************************************/
|
/* ICCARM-specific definitions ***********************************************/
|
||||||
|
|
||||||
#elif defined(__ICCARM__)
|
#elif defined(__ICCARM__)
|
||||||
@ -550,7 +521,6 @@
|
|||||||
# define CONFIG_HAVE_FLOAT 1
|
# define CONFIG_HAVE_FLOAT 1
|
||||||
# undef CONFIG_HAVE_DOUBLE
|
# undef CONFIG_HAVE_DOUBLE
|
||||||
# undef CONFIG_HAVE_LONG_DOUBLE
|
# undef CONFIG_HAVE_LONG_DOUBLE
|
||||||
# undef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* testing/fstest/fstest_main.c
|
* testing/fstest/fstest_main.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2015, 2018 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -150,11 +135,7 @@ static void fstest_loopmemusage(void)
|
|||||||
{
|
{
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmafter = mallinfo();
|
g_mmafter = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&g_mmafter);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous loop */
|
/* Show the change from the previous loop */
|
||||||
|
|
||||||
@ -163,11 +144,7 @@ static void fstest_loopmemusage(void)
|
|||||||
|
|
||||||
/* Set up for the next test */
|
/* Set up for the next test */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmprevious = g_mmafter;
|
g_mmprevious = g_mmafter;
|
||||||
#else
|
|
||||||
memcpy(&g_mmprevious, &g_mmafter, sizeof(struct mallinfo));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -176,11 +153,8 @@ static void fstest_loopmemusage(void)
|
|||||||
|
|
||||||
static void fstest_endmemusage(void)
|
static void fstest_endmemusage(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmafter = mallinfo();
|
g_mmafter = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&g_mmafter);
|
|
||||||
#endif
|
|
||||||
printf("\nFinal memory usage:\n");
|
printf("\nFinal memory usage:\n");
|
||||||
fstest_showmemusage(&g_mmbefore, &g_mmafter);
|
fstest_showmemusage(&g_mmbefore, &g_mmafter);
|
||||||
}
|
}
|
||||||
@ -963,13 +937,8 @@ int main(int argc, FAR char *argv[])
|
|||||||
|
|
||||||
/* Set up memory monitoring */
|
/* Set up memory monitoring */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmbefore = mallinfo();
|
g_mmbefore = mallinfo();
|
||||||
g_mmprevious = g_mmbefore;
|
g_mmprevious = g_mmbefore;
|
||||||
#else
|
|
||||||
mallinfo(&g_mmbefore);
|
|
||||||
memcpy(&g_mmprevious, &g_mmbefore, sizeof(struct mallinfo));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Loop a few times ... file the file system with some random, files,
|
/* Loop a few times ... file the file system with some random, files,
|
||||||
* delete some files randomly, fill the file system with more random file,
|
* delete some files randomly, fill the file system with more random file,
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* testing/nxffs/nxffs_main.c
|
* testing/nxffs/nxffs_main.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -181,11 +166,7 @@ static void nxffs_loopmemusage(void)
|
|||||||
{
|
{
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmafter = mallinfo();
|
g_mmafter = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&g_mmafter);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous loop */
|
/* Show the change from the previous loop */
|
||||||
|
|
||||||
@ -194,11 +175,7 @@ static void nxffs_loopmemusage(void)
|
|||||||
|
|
||||||
/* Set up for the next test */
|
/* Set up for the next test */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmprevious = g_mmafter;
|
g_mmprevious = g_mmafter;
|
||||||
#else
|
|
||||||
memcpy(&g_mmprevious, &g_mmafter, sizeof(struct mallinfo));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -207,13 +184,10 @@ static void nxffs_loopmemusage(void)
|
|||||||
|
|
||||||
static void nxffs_endmemusage(void)
|
static void nxffs_endmemusage(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
g_mmafter = mallinfo();
|
||||||
g_mmafter = mallinfo();
|
|
||||||
#else
|
printf("\nFinal memory usage:\n");
|
||||||
mallinfo(&g_mmafter);
|
nxffs_showmemusage(&g_mmbefore, &g_mmafter);
|
||||||
#endif
|
|
||||||
printf("\nFinal memory usage:\n");
|
|
||||||
nxffs_showmemusage(&g_mmbefore, &g_mmafter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -829,13 +803,8 @@ int main(int argc, FAR char *argv[])
|
|||||||
|
|
||||||
/* Set up memory monitoring */
|
/* Set up memory monitoring */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
g_mmbefore = mallinfo();
|
||||||
g_mmbefore = mallinfo();
|
|
||||||
g_mmprevious = g_mmbefore;
|
g_mmprevious = g_mmbefore;
|
||||||
#else
|
|
||||||
mallinfo(&g_mmbefore);
|
|
||||||
memcpy(&g_mmprevious, &g_mmbefore, sizeof(struct mallinfo));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Loop a few times ... file the file system with some random, files,
|
/* Loop a few times ... file the file system with some random, files,
|
||||||
* delete some files randomly, fill the file system with more random file,
|
* delete some files randomly, fill the file system with more random file,
|
||||||
|
@ -1,36 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* apps/testing/ostest/ostest_main.c
|
* apps/testing/ostest/ostest_main.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009, 2011-2012, 2014-2015, 2018 Gregory Nutt. All
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* rights reserved.
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -139,11 +123,7 @@ static void check_test_memory_usage(void)
|
|||||||
|
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmafter = mallinfo();
|
g_mmafter = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&g_mmafter);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous time */
|
/* Show the change from the previous time */
|
||||||
|
|
||||||
@ -152,11 +132,7 @@ static void check_test_memory_usage(void)
|
|||||||
|
|
||||||
/* Set up for the next test */
|
/* Set up for the next test */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmprevious = g_mmafter;
|
g_mmprevious = g_mmafter;
|
||||||
#else
|
|
||||||
memcpy(&g_mmprevious, &g_mmafter, sizeof(struct mallinfo));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* If so enabled, show the use of priority inheritance resources */
|
/* If so enabled, show the use of priority inheritance resources */
|
||||||
|
|
||||||
@ -224,13 +200,8 @@ static int user_main(int argc, char *argv[])
|
|||||||
|
|
||||||
usleep(HALF_SECOND_USEC);
|
usleep(HALF_SECOND_USEC);
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmbefore = mallinfo();
|
g_mmbefore = mallinfo();
|
||||||
g_mmprevious = g_mmbefore;
|
g_mmprevious = g_mmbefore;
|
||||||
#else
|
|
||||||
mallinfo(&g_mmbefore);
|
|
||||||
memcpy(&g_mmprevious, &g_mmbefore, sizeof(struct mallinfo));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
printf("\nuser_main: Begin argument test\n");
|
printf("\nuser_main: Begin argument test\n");
|
||||||
printf("user_main: Started with argc=%d\n", argc);
|
printf("user_main: Started with argc=%d\n", argc);
|
||||||
@ -553,11 +524,7 @@ static int user_main(int argc, char *argv[])
|
|||||||
|
|
||||||
usleep(HALF_SECOND_USEC);
|
usleep(HALF_SECOND_USEC);
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmafter = mallinfo();
|
g_mmafter = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&g_mmafter);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
printf("\nFinal memory usage:\n");
|
printf("\nFinal memory usage:\n");
|
||||||
show_memory_usage(&g_mmbefore, &g_mmafter);
|
show_memory_usage(&g_mmbefore, &g_mmafter);
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* testing/ostest/sigev_thread.c
|
* testing/ostest/sigev_thread.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -68,17 +53,9 @@ static int g_value_received;
|
|||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
static void sigev_thread_callback(union sigval value)
|
static void sigev_thread_callback(union sigval value)
|
||||||
#else
|
|
||||||
static void sigev_thread_callback(FAR void *sival_ptr)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
int sival_int = value.sival_int;
|
int sival_int = value.sival_int;
|
||||||
#else
|
|
||||||
int sival_int = (int)((intptr_t)sival_ptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
printf("sigev_thread_callback: Received value %d\n" , sival_int);
|
printf("sigev_thread_callback: Received value %d\n" , sival_int);
|
||||||
|
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* apps/testing/ostest/sighand.c
|
* apps/testing/ostest/sighand.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2008, 2011, 2016 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -300,11 +285,7 @@ void sighand_test(void)
|
|||||||
waiterpid, WAKEUP_SIGNAL, SIGVALUE_INT);
|
waiterpid, WAKEUP_SIGNAL, SIGVALUE_INT);
|
||||||
|
|
||||||
sigvalue.sival_int = SIGVALUE_INT;
|
sigvalue.sival_int = SIGVALUE_INT;
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
status = sigqueue(waiterpid, WAKEUP_SIGNAL, sigvalue);
|
status = sigqueue(waiterpid, WAKEUP_SIGNAL, sigvalue);
|
||||||
#else
|
|
||||||
status = sigqueue(waiterpid, WAKEUP_SIGNAL, sigvalue.sival_ptr);
|
|
||||||
#endif
|
|
||||||
if (status != OK)
|
if (status != OK)
|
||||||
{
|
{
|
||||||
printf("sighand_test: ERROR sigqueue failed\n" );
|
printf("sighand_test: ERROR sigqueue failed\n" );
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* testing/smart/smart_main.c
|
* testing/smart/smart_main.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -184,11 +169,7 @@ static void smart_loopmemusage(void)
|
|||||||
{
|
{
|
||||||
/* Get the current memory usage */
|
/* Get the current memory usage */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmafter = mallinfo();
|
g_mmafter = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&g_mmafter);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Show the change from the previous loop */
|
/* Show the change from the previous loop */
|
||||||
|
|
||||||
@ -197,11 +178,7 @@ static void smart_loopmemusage(void)
|
|||||||
|
|
||||||
/* Set up for the next test */
|
/* Set up for the next test */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmprevious = g_mmafter;
|
g_mmprevious = g_mmafter;
|
||||||
#else
|
|
||||||
memcpy(&g_mmprevious, &g_mmafter, sizeof(struct mallinfo));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -210,11 +187,8 @@ static void smart_loopmemusage(void)
|
|||||||
|
|
||||||
static void smart_endmemusage(void)
|
static void smart_endmemusage(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmafter = mallinfo();
|
g_mmafter = mallinfo();
|
||||||
#else
|
|
||||||
mallinfo(&g_mmafter);
|
|
||||||
#endif
|
|
||||||
printf("\nFinal memory usage:\n");
|
printf("\nFinal memory usage:\n");
|
||||||
smart_showmemusage(&g_mmbefore, &g_mmafter);
|
smart_showmemusage(&g_mmbefore, &g_mmafter);
|
||||||
}
|
}
|
||||||
@ -846,13 +820,8 @@ int main(int argc, FAR char *argv[])
|
|||||||
|
|
||||||
/* Set up memory monitoring */
|
/* Set up memory monitoring */
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
|
||||||
g_mmbefore = mallinfo();
|
g_mmbefore = mallinfo();
|
||||||
g_mmprevious = g_mmbefore;
|
g_mmprevious = g_mmbefore;
|
||||||
#else
|
|
||||||
mallinfo(&g_mmbefore);
|
|
||||||
memcpy(&g_mmprevious, &g_mmbefore, sizeof(struct mallinfo));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Loop a few times ... file the file system with some random, files,
|
/* Loop a few times ... file the file system with some random, files,
|
||||||
* delete some files randomly, fill the file system with more random file,
|
* delete some files randomly, fill the file system with more random file,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user