Commit 5f0a92e5 by Arnaud Charlet

Fix typos.

From-SVN: r229054
parent 319c6161
...@@ -91,14 +91,14 @@ package body GNAT.Debug_Pools is ...@@ -91,14 +91,14 @@ package body GNAT.Debug_Pools is
Disable : Boolean := False; Disable : Boolean := False;
-- This variable is used to avoid infinite loops, where this package would -- This variable is used to avoid infinite loops, where this package would
-- itself allocate memory and then calls itself recursively, forever. -- itself allocate memory and then call itself recursively, forever. Useful
-- Useful when System_Memory_Debug_Pool_Enabled is True. -- when System_Memory_Debug_Pool_Enabled is True.
System_Memory_Debug_Pool_Enabled : Boolean := False; System_Memory_Debug_Pool_Enabled : Boolean := False;
-- If True System.Memory allocation are using Debug_Pool -- If True, System.Memory allocation uses Debug_Pool
Allow_Unhandled_Memory : Boolean := False; Allow_Unhandled_Memory : Boolean := False;
-- If True protects Deallocate against releasing memory allocated before -- If True, protects Deallocate against releasing memory allocated before
-- System_Memory_Debug_Pool_Enabled was set. -- System_Memory_Debug_Pool_Enabled was set.
--------------------------- ---------------------------
...@@ -131,19 +131,18 @@ package body GNAT.Debug_Pools is ...@@ -131,19 +131,18 @@ package body GNAT.Debug_Pools is
Traceback : Tracebacks_Array_Access; Traceback : Tracebacks_Array_Access;
Kind : Traceback_Kind; Kind : Traceback_Kind;
Count : Natural; Count : Natural;
-- size of the memory allocated/freed at Traceback since last Reset -- Size of the memory allocated/freed at Traceback since last Reset call
-- call.
Total : Byte_Count; Total : Byte_Count;
-- number of chunk of memory allocated/freed at Traceback since last -- Number of chunk of memory allocated/freed at Traceback since last
-- Reset call. -- Reset call.
Frees : Natural; Frees : Natural;
-- number of chunk of memory allocated at Traceback, currently freed -- Number of chunk of memory allocated at Traceback, currently freed
-- since last Reset call. (only for Alloc & Indirect_Alloc elements) -- since last Reset call. (only for Alloc & Indirect_Alloc elements)
Total_Frees : Byte_Count; Total_Frees : Byte_Count;
-- size of the memory allocated at Traceback, currently freed since last -- Size of the memory allocated at Traceback, currently freed since last
-- Reset call. (only for Alloc & Indirect_Alloc elements) -- Reset call. (only for Alloc & Indirect_Alloc elements)
Next : Traceback_Htable_Elem_Ptr; Next : Traceback_Htable_Elem_Ptr;
...@@ -296,19 +295,19 @@ package body GNAT.Debug_Pools is ...@@ -296,19 +295,19 @@ package body GNAT.Debug_Pools is
-- Ignored_Frame_Start .. Ignored_Frame_End -- Ignored_Frame_Start .. Ignored_Frame_End
procedure Stdout_Put (S : String); procedure Stdout_Put (S : String);
-- Wrapper for Put that ensure we always write to stdout -- Wrapper for Put that ensures we always write to stdout instead of the
-- instead of the current output file defined in GNAT.IO. -- current output file defined in GNAT.IO.
procedure Stdout_Put_Line (S : String); procedure Stdout_Put_Line (S : String);
-- Wrapper for Put_Line that ensure we always write to stdout -- Wrapper for Put_Line that ensures we always write to stdout instead of
-- instead of the current output file defined in GNAT.IO. -- the current output file defined in GNAT.IO.
package Validity is package Validity is
function Is_Handled (Storage : System.Address) return Boolean; function Is_Handled (Storage : System.Address) return Boolean;
pragma Inline (Is_Handled); pragma Inline (Is_Handled);
-- Return True if Storage is the address of a block that the debug pool -- Return True if Storage is the address of a block that the debug pool
-- had already under its control. -- already had under its control. Used to allow System.Memory to use
-- Used to allow System.Memory to use Debug_Pools -- Debug_Pools
function Is_Valid (Storage : System.Address) return Boolean; function Is_Valid (Storage : System.Address) return Boolean;
pragma Inline (Is_Valid); pragma Inline (Is_Valid);
...@@ -635,13 +634,13 @@ package body GNAT.Debug_Pools is ...@@ -635,13 +634,13 @@ package body GNAT.Debug_Pools is
type Validity_Bits is record type Validity_Bits is record
Valid : Validity_Bits_Part_Ref := No_Validity_Bits_Part; Valid : Validity_Bits_Part_Ref := No_Validity_Bits_Part;
-- True if chunk of memory at this address currently allocated. -- True if chunk of memory at this address is currently allocated
Handled : Validity_Bits_Part_Ref := No_Validity_Bits_Part; Handled : Validity_Bits_Part_Ref := No_Validity_Bits_Part;
-- True if chunk of memory at this address was allocated once after -- True if chunk of memory at this address was allocated once after
-- Allow_Unhandled_Memory was set to True. -- Allow_Unhandled_Memory was set to True. Used to know on Deallocate
-- Used to know on Deallocate if chunk of memory should be handled -- if chunk of memory should be handled a block allocated by this
-- as a block allocated by this package. -- package.
end record; end record;
...@@ -658,7 +657,7 @@ package body GNAT.Debug_Pools is ...@@ -658,7 +657,7 @@ package body GNAT.Debug_Pools is
(Storage : System.Address; (Storage : System.Address;
Valid : Boolean) return Boolean; Valid : Boolean) return Boolean;
pragma Inline (Is_Valid_Or_Handled); pragma Inline (Is_Valid_Or_Handled);
-- internal implementation of Is_Valid and Is_Handled. -- Internal implementation of Is_Valid and Is_Handled.
-- Valid is used to select Valid or Handled arrays. -- Valid is used to select Valid or Handled arrays.
package Validy_Htable is new GNAT.HTable.Simple_HTable package Validy_Htable is new GNAT.HTable.Simple_HTable
...@@ -669,7 +668,7 @@ package body GNAT.Debug_Pools is ...@@ -669,7 +668,7 @@ package body GNAT.Debug_Pools is
Hash => Hash, Hash => Hash,
Equal => "="); Equal => "=");
-- Table to keep the validity and handled bit blocks for the allocated -- Table to keep the validity and handled bit blocks for the allocated
-- data -- data.
function To_Pointer is new Ada.Unchecked_Conversion function To_Pointer is new Ada.Unchecked_Conversion
(System.Address, Validity_Bits_Part_Ref); (System.Address, Validity_Bits_Part_Ref);
...@@ -1850,7 +1849,7 @@ package body GNAT.Debug_Pools is ...@@ -1850,7 +1849,7 @@ package body GNAT.Debug_Pools is
-- Handle only alloc elememts -- Handle only alloc elememts
if Elem.Kind = Alloc then if Elem.Kind = Alloc then
-- Ignore small blocks (depending on the sorting criteria) to -- Ignore small blocks (depending on the sorting criteria) to
-- gain speed -- gain speed.
if (Sort = Memory_Usage if (Sort = Memory_Usage
and then Elem.Total - Elem.Total_Frees >= 1_000) and then Elem.Total - Elem.Total_Frees >= 1_000)
......
...@@ -276,7 +276,7 @@ package GNAT.Debug_Pools is ...@@ -276,7 +276,7 @@ package GNAT.Debug_Pools is
Report : Report_Type := All_Reports); Report : Report_Type := All_Reports);
-- Dump information about memory usage. -- Dump information about memory usage.
-- Size is the number of the biggest memory users we want to show. Report -- Size is the number of the biggest memory users we want to show. Report
-- indicates which sorting order is used in the report -- indicates which sorting order is used in the report.
procedure Dump_Stdout procedure Dump_Stdout
(Pool : Debug_Pool; (Pool : Debug_Pool;
...@@ -294,29 +294,29 @@ package GNAT.Debug_Pools is ...@@ -294,29 +294,29 @@ package GNAT.Debug_Pools is
(Storage_Address : Address; (Storage_Address : Address;
Size_In_Storage_Elements : out Storage_Count; Size_In_Storage_Elements : out Storage_Count;
Valid : out Boolean); Valid : out Boolean);
-- set Valid if Storage_Address is the address of a chunk of memory -- Set Valid if Storage_Address is the address of a chunk of memory
-- currently allocated by any pool. -- currently allocated by any pool.
-- If Valid is True, Size_In_Storage_Elements is set to the size of this -- If Valid is True, Size_In_Storage_Elements is set to the size of this
-- chunk of memory. -- chunk of memory.
type Byte_Count is mod System.Max_Binary_Modulus; type Byte_Count is mod System.Max_Binary_Modulus;
-- Type used for maintaining byte counts, needs to be large enough -- Type used for maintaining byte counts, needs to be large enough to
-- to accommodate counts allowing for repeated use of the same memory. -- to accommodate counts allowing for repeated use of the same memory.
function High_Water_Mark function High_Water_Mark
(Pool : Debug_Pool) return Byte_Count; (Pool : Debug_Pool) return Byte_Count;
-- return the highest size of the memory allocated by the pool. -- Return the highest size of the memory allocated by the pool.
-- memory used internally by the pool is not taken into account. -- Memory used internally by the pool is not taken into account.
function Current_Water_Mark function Current_Water_Mark
(Pool : Debug_Pool) return Byte_Count; (Pool : Debug_Pool) return Byte_Count;
-- return the size of the memory currently allocated by the pool. -- Return the size of the memory currently allocated by the pool.
-- memory used internally by the pool is not taken into account. -- Memory used internally by the pool is not taken into account.
procedure System_Memory_Debug_Pool procedure System_Memory_Debug_Pool
(Has_Unhandled_Memory : Boolean := True); (Has_Unhandled_Memory : Boolean := True);
-- let the package know the System.Memory is using it. -- Let the package know the System.Memory is using it.
-- If Has_Unhandled_Memory is true, some deallocate can be done for -- If Has_Unhandled_Memory is true, some deallocation can be done for
-- memory not allocated with Allocate. -- memory not allocated with Allocate.
private private
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment