diff options
Diffstat (limited to 'java/org/gnu')
| -rw-r--r-- | java/org/gnu/emacs/EmacsNative.java | 3 | ||||
| -rw-r--r-- | java/org/gnu/emacs/EmacsService.java | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/java/org/gnu/emacs/EmacsNative.java b/java/org/gnu/emacs/EmacsNative.java index 946a38f7f84..78176dd0e47 100644 --- a/java/org/gnu/emacs/EmacsNative.java +++ b/java/org/gnu/emacs/EmacsNative.java | |||
| @@ -96,6 +96,9 @@ public final class EmacsNative | |||
| 96 | thread, then return. */ | 96 | thread, then return. */ |
| 97 | public static native void shutDownEmacs (); | 97 | public static native void shutDownEmacs (); |
| 98 | 98 | ||
| 99 | /* Garbage collect and clear each frame's image cache. */ | ||
| 100 | public static native void onLowMemory (); | ||
| 101 | |||
| 99 | /* Abort and generate a native core dump. */ | 102 | /* Abort and generate a native core dump. */ |
| 100 | public static native void emacsAbort (); | 103 | public static native void emacsAbort (); |
| 101 | 104 | ||
diff --git a/java/org/gnu/emacs/EmacsService.java b/java/org/gnu/emacs/EmacsService.java index ab6d57b9c4f..1aac1a6c4dd 100644 --- a/java/org/gnu/emacs/EmacsService.java +++ b/java/org/gnu/emacs/EmacsService.java | |||
| @@ -321,6 +321,10 @@ public final class EmacsService extends Service | |||
| 321 | } | 321 | } |
| 322 | } | 322 | } |
| 323 | 323 | ||
| 324 | /* The native functions the subsequent two functions call do nothing | ||
| 325 | in the infrequent case the Emacs thread is awaiting a response | ||
| 326 | for the main thread. Caveat emptor! */ | ||
| 327 | |||
| 324 | @Override | 328 | @Override |
| 325 | public void | 329 | public void |
| 326 | onDestroy () | 330 | onDestroy () |
| @@ -333,6 +337,14 @@ public final class EmacsService extends Service | |||
| 333 | super.onDestroy (); | 337 | super.onDestroy (); |
| 334 | } | 338 | } |
| 335 | 339 | ||
| 340 | @Override | ||
| 341 | public void | ||
| 342 | onLowMemory () | ||
| 343 | { | ||
| 344 | EmacsNative.onLowMemory (); | ||
| 345 | super.onLowMemory (); | ||
| 346 | } | ||
| 347 | |||
| 336 | 348 | ||
| 337 | 349 | ||
| 338 | /* Functions from here on must only be called from the Emacs | 350 | /* Functions from here on must only be called from the Emacs |