Other |
---|
tbdUnresolved |
Relates :
|
|
Relates :
|
Please refer to 6913047 "Long term memory leak when using PKCS11 and JCE exceeds 32 bit process address space" for more details. Here is a quick summary of the problem encountered: native resources/memory are allocated by native PKCS11 library and returned to java apps for use. These wrapper objects containing the native resources/memories are cleaned up by the weak reference queue mechanism. However, if GC isn't run, then these wrapper objects aren't en-queued for cleaning up and the associated native memories aren't freed. This may lead to an OOM situation whenever native PKCS11 library allocates memory faster than GC is called to free up the native resources. Thus, to avoid this kind of OOM situation, we need some way to be able to free up these native resources automatically. It is suggested that this may be addressed by having a separate set of APIs to trigger the weak reference processing (without doing the GC).