Modify ↓
Opened 17 years ago
Closed 14 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
- Can the menu items in Presets be listed alphabetically
- Not easy to find out how to remove info boxes from left hand side e.g conflicts,command stack - still haven't found out!
- 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 , 17 years ago
| Summary: | User Improvements → Warn User if JVM doesn't allocate enough memory for JOSM |
|---|
comment:2 by , 17 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:4 by , 14 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.



what's a reasonable limit for this?