Modify

Opened 15 years ago

Closed 13 years ago

#2134 closed defect (fixed)

Warn User if JVM doesn't allocate enough memory for JOSM

Reported by: anonymous Owned by: framm
Priority: trivial Milestone:
Component: unspecified Version:
Keywords: Cc:

Description

  1. Can the menu items in Presets be listed alphabetically
  1. Not easy to find out how to remove info boxes from left hand side e.g conflicts,command stack - still haven't found out!
  1. out of memeory message - not easy to find out how to reset XmXX - resolved this but it took a lot of searching

Attachments (0)

Change History (4)

comment:1 by xeen, 15 years ago

Summary: User ImprovementsWarn User if JVM doesn't allocate enough memory for JOSM
  1. Dup of #1839
  2. It's not possible yet, dup of #1938
  3. It may be worth investigating if it's possible to display a warning beforehand to make it more obvious. The maximum available memory can be checked using
Runtime.getRuntime().maxMemory()/1024/1024

what's a reasonable limit for this?

comment:2 by GeoJ <geoj@…>, 15 years ago

You can register custom notification limits regarding the memory allocation.

Example for a notification if memory usage reaches 90%:

MemoryMXBean mbean = ManagementFactory.getMemoryMXBean();
NotificationBroadcaster emitter = (NotificationBroadcaster) mbean;
emitter.addNotificationListener(this, null, null); // this must implement NotificationListener
for (MemoryPoolMXBean memPool : ManagementFactory.getMemoryPoolMXBeans()) {
  if (memPool.isUsageThresholdSupported()) {
    MemoryUsage memUsage = memPool.getUsage();
    memPool.setUsageThreshold((long) (memUsage.getMax() * 0.9));
  }
}
public void handleNotification(Notification notification, Object handback) {
  if (!MemoryNotificationInfo.MEMORY_THRESHOLD_EXCEEDED.equals(type)) return;
  [notification code]

comment:3 by stoecker, 14 years ago

Ticket #3965 has been marked as a duplicate of this ticket.

comment:4 by stoecker, 13 years ago

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain framm.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.