Wait, the changes to the memory constants are losing all of the initialized
values.  This will completely break memory management.

Rick
---------- Forwarded message ----------
From: <[email protected]>
Date: Mon, Jun 27, 2016 at 10:07 AM
Subject: [Oorexx-svn] SF.net SVN: oorexx-code-0:[11060]
main/trunk/interpreter
To: [email protected]


Revision: 11060
          http://sourceforge.net/p/oorexx/code-0/11060
Author:   erich_st
Date:     2016-06-27 14:07:30 +0000 (Mon, 27 Jun 2016)
Log Message:
-----------
Erico Mendonca: fixes the undefined symbols errors seen on some distros

Modified Paths:
--------------
    main/trunk/interpreter/classes/StringClass.cpp
    main/trunk/interpreter/classes/StringClass.hpp
    main/trunk/interpreter/memory/MemorySegment.cpp
    main/trunk/interpreter/memory/MemorySegment.hpp
    main/trunk/interpreter/runtime/Numerics.cpp
    main/trunk/interpreter/runtime/Numerics.hpp

Modified: main/trunk/interpreter/classes/StringClass.cpp
===================================================================
--- main/trunk/interpreter/classes/StringClass.cpp      2016-06-27 13:57:01
UTC (rev 11059)
+++ main/trunk/interpreter/classes/StringClass.cpp      2016-06-27 14:07:30
UTC (rev 11060)
@@ -68,6 +68,14 @@
 const char *RexxString::UPPER_ALPHA  = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
 const char *RexxString::DIGITS_BASE64 =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

+const char RexxString::ch_PLUS='+';
+const char RexxString::ch_MINUS='-';
+const char RexxString::ch_PERIOD='.';
+const char RexxString::ch_ZERO='0';
+const char RexxString::ch_ONE='1';
+const char RexxString::ch_FIVE='5';
+const char RexxString::ch_NINE='9';
+
 /**
  * Create initial class object at bootstrap time.
  */

Modified: main/trunk/interpreter/classes/StringClass.hpp
===================================================================
--- main/trunk/interpreter/classes/StringClass.hpp      2016-06-27 13:57:01
UTC (rev 11059)
+++ main/trunk/interpreter/classes/StringClass.hpp      2016-06-27 14:07:30
UTC (rev 11060)
@@ -713,13 +713,13 @@
     static const char ch_TAB   = '\t';

     // Define char data used in in number string parsing
-    static const char ch_MINUS  = '-';
-    static const char ch_PLUS   = '+';
-    static const char ch_PERIOD = '.';
-    static const char ch_ZERO   = '0';
-    static const char ch_ONE    = '1';
-    static const char ch_FIVE   = '5';
-    static const char ch_NINE   = '9';
+    static const char ch_MINUS;
+    static const char ch_PLUS;
+    static const char ch_PERIOD;
+    static const char ch_ZERO;
+    static const char ch_ONE;
+    static const char ch_FIVE;
+    static const char ch_NINE;

     // character validation sets for the datatype function
     static const char *HEX_CHAR_STR;
@@ -800,4 +800,6 @@
 {
     return new_upper_string(string, strlen(string));
 }
+
+
 #endif

Modified: main/trunk/interpreter/memory/MemorySegment.cpp
===================================================================
--- main/trunk/interpreter/memory/MemorySegment.cpp     2016-06-27 13:57:01
UTC (rev 11059)
+++ main/trunk/interpreter/memory/MemorySegment.cpp     2016-06-27 14:07:30
UTC (rev 11060)
@@ -51,6 +51,16 @@
 // The point where we consider releasing segments
 const double NormalSegmentSet::NormalMemoryContractionThreshold = .70;

+const size_t MemorySegmentSet::MinimumSegmentSize =
(MemorySegment::SegmentSize/2);
+// amount of usable space in a minimum sized segment
+const size_t MemorySegmentSet::MinimumSegmentDeadSpace =
(MinimumSegmentSize - MemorySegment::MemorySegmentOverhead);
+// default size for a larger segment allocation
+const size_t MemorySegmentSet::LargeSegmentSize =
(MemorySegment::SegmentSize * 4);;
+// allocation available in a default segment
+const size_t MemorySegmentSet::SegmentDeadSpace =
(MemorySegment::SegmentSize - MemorySegment::MemorySegmentOverhead);
+// space available in a larger allocation.
+const size_t MemorySegmentSet::LargeSegmentDeadSpace = (LargeSegmentSize -
MemorySegment::MemorySegmentOverhead);
+const size_t NormalSegmentSet::InitialNormalSegmentSpace =
((LargeSegmentSize * 8) - MemorySegment::MemorySegmentOverhead);

 /**
  * Dump information about an individual segment

Modified: main/trunk/interpreter/memory/MemorySegment.hpp
===================================================================
--- main/trunk/interpreter/memory/MemorySegment.hpp     2016-06-27 13:57:01
UTC (rev 11059)
+++ main/trunk/interpreter/memory/MemorySegment.hpp     2016-06-27 14:07:30
UTC (rev 11060)
@@ -286,15 +286,15 @@
       virtual DeadObject *donateObject(size_t allocationLength);
       virtual MemorySegment *donateSegment(size_t allocationLength);

-      static const size_t MinimumSegmentSize =
(MemorySegment::SegmentSize/2);
+      static const size_t MinimumSegmentSize;
       // amount of usable space in a minimum sized segment
-      static const size_t MinimumSegmentDeadSpace = (MinimumSegmentSize -
MemorySegment::MemorySegmentOverhead);
+      static const size_t MinimumSegmentDeadSpace;
       // default size for a larger segment allocation
-      static const size_t LargeSegmentSize = (MemorySegment::SegmentSize *
4);;
+      static const size_t LargeSegmentSize;
       // allocation available in a default segment
-      static const size_t SegmentDeadSpace = (MemorySegment::SegmentSize -
MemorySegment::MemorySegmentOverhead);
+      static const size_t SegmentDeadSpace;
       // space available in a larger allocation.
-      static const size_t LargeSegmentDeadSpace = (LargeSegmentSize -
MemorySegment::MemorySegmentOverhead);
+      static const size_t LargeSegmentDeadSpace;

   protected:

@@ -505,7 +505,7 @@
     // allocation request for the recovery segment
     static const size_t RecoverSegmentSize =
((MemorySegment::SegmentSize/2) - MemorySegment::MemorySegmentOverhead);
     // initial allocation size for normal space.
-    static const size_t InitialNormalSegmentSpace = ((LargeSegmentSize *
8) - MemorySegment::MemorySegmentOverhead);
+    static const size_t InitialNormalSegmentSpace;

     // map an object length to an allocation deadpool.  NOTE:  this
     // assumes the length has already been rounded to ObjectGrain!

Modified: main/trunk/interpreter/runtime/Numerics.cpp
===================================================================
--- main/trunk/interpreter/runtime/Numerics.cpp 2016-06-27 13:57:01 UTC
(rev 11059)
+++ main/trunk/interpreter/runtime/Numerics.cpp 2016-06-27 14:07:30 UTC
(rev 11060)
@@ -91,8 +91,10 @@
 const NumericSettings Numerics::defaultSettings;
 const NumericSettings *Numerics::settings = &Numerics::defaultSettings;

+const bool Numerics::FORM_SCIENTIFIC = false;
+const bool Numerics::FORM_ENGINEERING = true;
+const bool Numerics::DEFAULT_FORM = FORM_SCIENTIFIC;

-
 /**
  * Initialize a NumericSettings object.
  */

Modified: main/trunk/interpreter/runtime/Numerics.hpp
===================================================================
--- main/trunk/interpreter/runtime/Numerics.hpp 2016-06-27 13:57:01 UTC
(rev 11059)
+++ main/trunk/interpreter/runtime/Numerics.hpp 2016-06-27 14:07:30 UTC
(rev 11060)
@@ -107,11 +107,11 @@

     // max numeric digits value for explicit 64-bit conversions
     static const wholenumber_t DIGITS64 = 20;
-    static const bool FORM_SCIENTIFIC = false;
-    static const bool FORM_ENGINEERING = true;
+    static const bool FORM_SCIENTIFIC;
+    static const bool FORM_ENGINEERING;

     static const wholenumber_t DEFAULT_FUZZ = 0;
-    static const bool DEFAULT_FORM = FORM_SCIENTIFIC;
+    static const bool DEFAULT_FORM;

     static const wholenumber_t validMaxWhole[];      // table of maximum
values per digits setting



------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Oorexx-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-svn
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to