2008-06-05 Joel Sherrill <joel.sherrill@OARcorp.com>

* posix/src/psignal.c: Do not allocate any memory for queued signals if
	the configuration parameter is 0. Before we would end up with an
	allocation of 0 which rounded up and wasted some memory when POSIX
	was configured.
This commit is contained in:
Joel Sherrill
2008-06-05 14:36:11 +00:00
parent 393a861dbd
commit c7fae60091
2 changed files with 19 additions and 8 deletions

View File

@@ -1,3 +1,10 @@
2008-06-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/psignal.c: Do not allocate any memory for queued signals if
the configuration parameter is 0. Before we would end up with an
allocation of 0 which rounded up and wasted some memory when POSIX
was configured.
2008-06-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* libcsupport/src/newlibc_exit.c: Only run the fini section on exit if

View File

@@ -205,12 +205,16 @@ void _POSIX_signals_Manager_Initialization(
for ( signo=1 ; signo<= SIGRTMAX ; signo++ )
_Chain_Initialize_empty( &_POSIX_signals_Siginfo[ signo ] );
_Chain_Initialize(
&_POSIX_signals_Inactive_siginfo,
_Workspace_Allocate_or_fatal_error(
maximum_queued_signals * sizeof( POSIX_signals_Siginfo_node )
),
maximum_queued_signals,
sizeof( POSIX_signals_Siginfo_node )
);
if ( maximum_queued_signals ) {
_Chain_Initialize(
&_POSIX_signals_Inactive_siginfo,
_Workspace_Allocate_or_fatal_error(
maximum_queued_signals * sizeof( POSIX_signals_Siginfo_node )
),
maximum_queued_signals,
sizeof( POSIX_signals_Siginfo_node )
);
} else {
_Chain_Initialize_empty( &_POSIX_signals_Inactive_siginfo );
}
}