Commit Graph

23 Commits

Author SHA1 Message Date
Joel Sherrill
1ef07d4620 testsuites/libtests/[d-o]*: Change license to BSD-2
Updates #3053.
2022-04-07 08:38:56 -05:00
Sebastian Huber
d7205f0083 libc: Optimize malloc() initialization
The BSPs provide memory for the separate C Program Heap initialization
via _Memory_Get().  Most BSPs provide exactly one memory area.  Only two
BSPs provide more than one memory area (arm/altera-cyclone-v and
bsps/powerpc/mpc55xxevb).  Only if more than one memory area is
provided, there is a need to use _Heap_Extend().  Provide two
implementations to initialize the separate C Program Heap and let the
BSP select one of the implementations based on the number of provided
memory areas.  This gets rid of a dependency on _Heap_Extend().  It
also avoids dead code sections for most BSPs.

Change licence to BSD-2-Clause according to file history.

Update #3053.
2021-11-30 08:33:12 +01:00
Sebastian Huber
ccaec9661f libtests/malloc04: Fix typo
Update #3838.
2020-02-04 11:25:45 +01:00
Sebastian Huber
eea21eaca1 bsps: Rework work area initialization
The work area initialization was done by the BSP through
bsp_work_area_initialize(). This approach predated the system
initialization through the system initialization linker set. The
workspace and C program heap were unconditionally initialized.  The aim
is to support RTEMS application configurations which do not need the
workspace and C program heap.  In these configurations, the workspace
and C prgram heap should not get initialized.

Change all bsp_work_area_initialize() to implement _Memory_Get()
instead.  Move the dirty memory, sbrk(), per-CPU data, workspace, and
malloc() heap initialization into separate system initialization steps.
This makes it also easier to test the individual initialization steps.

This change adds a dependency to _Heap_Extend() to all BSPs.  This
dependency will be removed in a follow up change.

Update #3838.
2020-02-04 06:06:41 +01:00
Sebastian Huber
c4b8b147dd tests: Use simple console driver
Update #3170.
Update #3199.
2017-11-06 07:26:42 +01:00
Sebastian Huber
af4355459e tests: Remove TEST_INIT
The TEST_EXTERN is a used only by the system.h style tests and they use
CONFIGURE_INIT appropriately.

Update #3170.
Update #3199.
2017-10-28 13:33:56 +02:00
Chris Johns
98c6d50145 testsuite: Use printk for all test output where possible.
- Remove the printf support leaving the direct printk support configured
  with TESTS_USE_PRINTK and all other output goes via a buffered vsniprintf
  call to printk.
- Control the test's single init for functions and global data with
  TEST_INIT and not CONFIGURE_INIT. They are now separate.

Updates #3170.
2017-10-23 16:25:45 +11:00
Chris Johns
c49985691f Change all references of rtems.com to rtems.org. 2014-03-21 08:10:47 +11:00
Sebastian Huber
f8b2eb03f7 tests/libtests: Use <rtems/test.h> 2014-03-20 09:10:26 +01:00
Sebastian Huber
ede5a2a4d5 libtests/malloc04: Fixes for RTEMS_DEBUG 2nd try 2013-07-26 14:00:00 +02:00
Sebastian Huber
044f317aac libtests/malloc04: Fixes for RTEMS_DEBUG 2013-07-26 11:55:37 +02:00
Sebastian Huber
9deed9edbf libtests/malloc04: Prevent compiler optimizations 2013-05-10 12:10:14 +02:00
Sebastian Huber
85387db5aa libtests/malloc04: Adjust for new sbrk() support 2013-05-03 17:30:53 +02:00
Sebastian Huber
47a3cd8f73 score: Work area initialization API change
The work areas (RTEMS work space and C program heap) will be initialized
now in a separate step and are no longer part of
rtems_initialize_data_structures().  Initialization is performed with
tables of Heap_Area entries.  This allows usage of scattered memory
areas present on various small scale micro-controllers.

The sbrk() support API changes also.  The bsp_sbrk_init() must now deal
with a minimum size for the first memory chunk to take the configured
work space size into account.
2012-10-25 14:54:06 +02:00
Joel Sherrill
9b4422a251 Remove All CVS Id Strings Possible Using a Script
Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines
  next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
  contain CVS Ids
+ If the processing left a blank line at the top of
  a file, it was removed.
2012-05-11 08:44:13 -05:00
Ralf Corsepius
f27d2f8cb9 2011-10-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* malloc04/init.c: Define p1, p2, p3, p4 extern (Avoid warnings).
2011-10-22 04:18:39 +00:00
Joel Sherrill
747d8081a9 2011-07-12 Joel Sherrill <joel.sherrill@oarcorp.com>
* malloc04/init.c, malloc04/malloc04.scn: Remove test cases which are
	obsolete.
2011-07-12 15:55:44 +00:00
Joel Sherrill
c4239324ca 2011-05-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* malloc04/init.c: Fix tests broken in warning pass.
2011-05-06 17:29:25 +00:00
Joel Sherrill
6f27ba8077 2011-05-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* devnullfatal01/testcase.h, malloc02/init.c, malloc04/init.c,
	malloctest/init.c, termios03/termios_testdriver_polled.c,
	termios04/termios_testdriver_intr.c: Remove warnings.
2011-05-05 16:45:47 +00:00
Ralf Corsepius
7d3f9c646a Add HAVE_CONFIG_H. 2011-02-22 07:37:03 +00:00
Joel Sherrill
07b93de9fd 2010-08-10 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1661/testing
	* malloc04/init.c: Add public methods to get/set malloc heap pointer so
	the tests do not have to peer behind the API.
2010-08-10 13:15:38 +00:00
Joel Sherrill
830c6eee8e 2010-07-14 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1535/tests
	* malloc04/init.c, malloc04/malloc04.scn: Address issues in test. A mix
	of work by Ralf and Joel.
2010-07-14 23:23:12 +00:00
Joel Sherrill
843ad7b5ff 2010-07-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Add test for exercising sbrk() extension
	to Malloc Family.
	* malloc04/.cvsignore, malloc04/Makefile.am, malloc04/init.c,
	malloc04/malloc04.doc, malloc04/malloc04.scn: New files.
2010-07-08 20:11:48 +00:00