Thread: Memory leaks on stable server[QUESTION]

Results 1 to 3 of 3
  1. #1 Memory leaks on stable server[QUESTION] 
    Registered Member Beershake's Avatar
    Join Date
    Mar 2011
    Age
    28
    Posts
    287
    Thanks given
    49
    Thanks received
    25
    Rep Power
    2
    I saw a thread by Palidino that he asked something about memory leaks and about this:

    System.gc();

    Could this cause memory leaks? I'm not sure about it because I'm cleaning battlescape and trying to remove all methods that can cause memory leaks,
    so I want to ask someone who is rlly decent at java, someone like blake , Graham, Scu11 or someone who could know thanks.
    Reply With Quote  
     

  2. #2  
    Registered Member thiefmn6092's Avatar
    Join Date
    Dec 2006
    Age
    24
    Posts
    2
    Thanks given
    26
    Thanks received
    389
    Rep Power
    0
    No, all that does is hint at the Java Virtual Machine (the native program that handles running compiled Java bytecode) to use the garbage collector of choices scan algorithm to remove dead references from memory.

    A memory leak is caused (at least in Java's case) when a reference lingers to an unused object... therefor a garbage collection cycle wouldn't have an effect because the virtual machine still thinks the object is being used.

    On a side note, however, it's possible that is there are a lot of allocations and deallocations (such as ByteBuffer being used in some sort of Packet wrapper), those objects can linger and take up massive amounts of memory, causing any subsequent full garbage collections to take a long time. If you are having memory issues, leave the explicit calls in code and then try your server with the

    Code:
    -XX:-DisableExplicitGC
    switch to let the virtual machine handle the garbage collection cycles. You'll have to watch performance and compare the two to see which one makes more sense for your server.
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member Beershake's Avatar
    Join Date
    Mar 2011
    Age
    28
    Posts
    287
    Thanks given
    49
    Thanks received
    25
    Rep Power
    2
    Thank you really much helped a lot.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Factor-Zero Pk Server [Lumby Pvp] [Memory Leaks FIXED]
    By Tylers Pur3 in forum Downloads
    Replies: 178
    Last Post: 03-05-2014, 11:00 PM
  2. Memory leaks
    By Spooky in forum Informative Threads
    Replies: 25
    Last Post: 07-01-2011, 10:26 PM
  3. Memory Leaks [PI]
    By Ophion in forum Help
    Replies: 13
    Last Post: 04-26-2011, 04:14 AM
  4. Memory leaks
    By kopjekoffiee in forum Help
    Replies: 0
    Last Post: 03-14-2011, 04:01 PM
  5. Memory leaks
    By kopjekoffiee in forum Help
    Replies: 1
    Last Post: 03-14-2011, 03:58 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •