Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Wiki Markup
Since JDK 1.2, the generational garbage collector has reduced memory allocation costs to low levels, in many cases lower than C or C++. Generational garbage collection reduces garbage collection costs by grouping objects into generations. The _younger generation_ consists of short-lived objects. The GC performs a minor collection on the younger generation when it fills up with dead objects \[java:[Oracle 2010a|AA. Bibliography#Oracle 10]\]. Improved garbage collection algorithms have reduced the cost of garbage collection  so that it is proportional to the number of live objects in the younger generation rather than to the total number of objects allocated since the last garbage collection.

Wiki Markup
Note that objects in the younger generation that persist for longer durations are _tenured_ and are moved to the _tenured generation_. Few younger generation objects continue to live through to the next garbage collection cycle. The rest become ready to be collected in the impending collection cycle \[java:[Oracle 2010a|AA. Bibliography#Oracle 10]\].

...

Wiki Markup
Program logic occasionally requires tight control over the lifetime of an object referenced from a local variable. In the unusual cases where such control is necessary, use a lexical block to limit the scope of the variable because the garbage collector can collect the object immediately when it goes out of scope \[java:[Bloch 2008|AA. Bibliography#Bloch 08]\].

...

Wiki Markup
When using this pattern, the Null object must be a singleton and must be final. It may be either public or private, depending on the overall design of the {{DataElement}} class. The state of the Null object should be immutable after creation; this can be enforced either by use of final fields or by explicit code in the methods of the {{DataElement}} class. See \[java:[Grand 2002|AA. Bibliography#Grand 02]\] "Chapter 8, Behavioral patterns, the Null Object" for additional information on this design pattern.

...

GERONIMO-4574

Related Guidelines

MITRE 2009CWE

CWE ID 405, "Asymmetric Resource Consumption (Amplification)"

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="5b3b4393ce677e54-a114b0cb-4497423e-81be9dc0-1eeb797c516c463d4604e868"><ac:plain-text-body><![CDATA[

[java:[API 2006

AA. Bibliography#API 06]]

Class System

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="b195986d0f31ca01-55a15433-474b485c-86a9b86e-c431659bb2ada90816ad285f"><ac:plain-text-body><![CDATA[

[java:[Bloch 2008

AA. Bibliography#Bloch 08]]

Item 6: "Eliminate obsolete object references"

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f7c71fdcd37a12db-00667d2d-458e4605-9cceb6a7-b6d0f55ac82254bf4ef172c9"><ac:plain-text-body><![CDATA[

[java:[Coomes 2007

AA. Bibliography#Coomes 07]]

Garbage Collection Concepts and Programming Tips

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="59a2a91c5bd9b09b-5c8bb2e5-4f2e431b-ae6e9288-c4055e11dd24f3b9338a2151"><ac:plain-text-body><![CDATA[

[java:[Goetz 2004

AA. Bibliography#Goetz 04]]

Java theory and practice: Garbage collection and performance

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ad826fdc701384c2-e66a9250-45ba4863-ae018c27-7a8ebb20167dfb78a2ab6944"><ac:plain-text-body><![CDATA[

[java:[Lo 2005

AA. Bibliography#Lo 05]]

Security Issues in Garbage Collection

]]></ac:plain-text-body></ac:structured-macro>

...