-
+ 1B65230304D4B1FC0489631028E23841691F7857BADCECC818986A0BE8C46B41F29297DE51C3CADD2A1D2794B2E955B4CFA27593A1E2D5B89DA128A797B2D45Fzfp/adainclude/s-parame.adb(0 . 0)(1 . 65)
558 ------------------------------------------------------------------------------
559 ------------------------------------------------------------------------------
560 -- You do not have, nor can you ever acquire the right to use, copy or --
561 -- distribute this software ; Should you use this software for any purpose, --
562 -- or copy and distribute it to anyone or in any manner, you are breaking --
563 -- the laws of whatever soi-disant jurisdiction, and you promise to --
564 -- continue doing so for the indefinite future. In any case, please --
565 -- always : read and understand any software ; verify any PGP signatures --
566 -- that you use - for any purpose. --
567 -- --
568 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
569 ------------------------------------------------------------------------------
570 ------------------------------------------------------------------------------
571
572 -- This is the default (used on all native platforms) version of this package
573
574 pragma Compiler_Unit_Warning;
575
576 package body System.Parameters is
577
578 -------------------------
579 -- Adjust_Storage_Size --
580 -------------------------
581
582 function Adjust_Storage_Size (Size : Size_Type) return Size_Type is
583 begin
584 if Size = Unspecified_Size then
585 return Default_Stack_Size;
586 elsif Size < Minimum_Stack_Size then
587 return Minimum_Stack_Size;
588 else
589 return Size;
590 end if;
591 end Adjust_Storage_Size;
592
593 ------------------------
594 -- Default_Stack_Size --
595 ------------------------
596
597 function Default_Stack_Size return Size_Type is
598 Default_Stack_Size : Integer;
599 pragma Import (C, Default_Stack_Size, "__gl_default_stack_size");
600 begin
601 if Default_Stack_Size = -1 then
602 return 2 * 1024 * 1024;
603 else
604 return Size_Type (Default_Stack_Size);
605 end if;
606 end Default_Stack_Size;
607
608 ------------------------
609 -- Minimum_Stack_Size --
610 ------------------------
611
612 function Minimum_Stack_Size return Size_Type is
613 begin
614 -- 12K is required for stack-checking to work reliably on most platforms
615 -- when using the GCC scheme to propagate an exception in the ZCX case.
616 -- 16K is the value of PTHREAD_STACK_MIN under Linux, so is a reasonable
617 -- default.
618
619 return 16 * 1024;
620 end Minimum_Stack_Size;
621
622 end System.Parameters;