Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #11490 (new)

Opened 11 years ago

Last modified 8 years ago

Thread-safe memory-block helper

Reported by: jamoore Owned by: java@…
Priority: major Milestone: Unscheduled
Component: General Version: 4.4.8
Keywords: n.a. Cc: mlinkert
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description (last modified by jamoore)

A thread-safe helper should be written that will allow tests to check out large chunks of memory that it hopes to use. The total size of the memory should default to the available JVM memory but should be configurable. The size take on each checkout, as well as how long to wait (if at all) should also be configurable. In pseudo-code:

  public final static long oneGB = 1024 * 1024 * 1024;

  Helper helper = new Helper();
  // Optionally: helper = new Helper(4 * oneGB);
  try {
    Memory memory = helper.acquireBytes(oneGB);
    // Optionally:
    // helper.acquireBytes(oneGB, 1000, TimeUnits.MILLISECONDS);


    // Possibly long-running processing here, but try to acquire
    // and free the memory as close to its usage as possible.


  } finally {
    memory.free();
  }

See:

Change History (4)

comment:1 Changed 11 years ago by jamoore

  • Description modified (diff)

comment:2 Changed 11 years ago by mlinkert

  • Cc mlinkert added

comment:2 Changed 11 years ago by mlinkert

comment:3 Changed 8 years ago by sbesson

  • Milestone changed from Testing2 to Unscheduled
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.68703 sec.)

We're Hiring!