Search Results

Search found 6189 results on 248 pages for 'garbage collection'.

Page 18/248 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Need personal music collection streaming solution

    - by purpler
    I used to use Opera and it's built in media server feature for some time and it both worked and looked really well. It's dead now and i'm in search of a decent audio streaming solution (Windows 8) to be able to stream my music collection via http to work or whatever.. I tried couple of PHP scripts but they all looked really awful, also, tried couple of solutions mentioned here at Superuser but i wasn't really satisfied.. I tried vibestreamer as well and while it looks really nice i'm not really into installing it as an application. I've set up an WAMP server which i intend to use in this purpose. I'd be mostly satisfied with a way to browse my collection folders and pick the one i want to play, no playlists and various sorting features a la iTunes. Any suggestions? Thanks

    Read the article

  • Why is it a bad practice to call System.gc?

    - by zneak
    After answering to a question about how to force-free objects in Java (the guy was clearing a 1.5GB HashMap) with System.gc(), I've been told it's a bad practice to call System.gc() manually, but the comments seemed mitigated about it. So much that no one dared to upvote it, nor downvote it. I've been told there it's a bad practice, but then I've also been told garbage collector runs don't systematically stop the world anymore, and that it could also be only seen as a hint, so I'm kind of at loss. I do understand that usually the JVM knows better than you when it needs to reclaim memory. I also understand that worrying about a few kilobytes of data is silly. And I also understand that even megabytes of data isn't what it was a few years back. But still, 1.5 gigabyte? And you know there's like 1.5 GB of data hanging around in memory; it's not like it's a shot in the dark. Is System.gc() systematically bad, or is there some point at which it becomes okay? So the question is actually double: Why is it or not a bad practice to call System.gc()? Is it really a hint under certain implementations, or is it always a full collection cycle? Are there really garbage collector implementations that can do their work without stopping the world? Please shed some light over the various assertions people have made. Where's the threshold? Is it never a good idea to call System.gc(), or are there times when it's acceptable? If any, what are those times?

    Read the article

  • Please help us non-C++ developers understand what RAII is

    - by Charlie Flowers
    Another question I thought for sure would have been asked before, but I don't see it in the "Related Questions" list. Could you C++ developers please give us a good description of what RAII is, why it is important, and whether or not it might have any relevance to other languages? I do know a little bit. I believe it stands for "Resource Acquisition is Initialization". However, that name doesn't jive with my (possibly incorrect) understanding of what RAII is: I get the impression that RAII is a way of initializing objects on the stack such that, when those variables go out of scope, the destructors will automatically be called causing the resources to be cleaned up. So why isn't that called "using the stack to trigger cleanup" (UTSTTC:)? How do you get from there to "RAII"? And how can you make something on the stack that will cause the cleanup of something that lives on the heap? Also, are there cases where you can't use RAII? Do you ever find yourself wishing for garbage collection? At least a garbage collector you could use for some objects while letting others be managed? Thanks.

    Read the article

  • Why does this code sample produce a memory leak?

    - by citronas
    In the university we were given the following code sample and we were being told, that there is a memory leak when running this code. The sample should demonstrate that this is a situation where the garbage collector can't work. As far as my object oriented programming goes, the only codeline able to create a memory leak would be items=Arrays.copyOf(items,2 * size+1); The documentation says, that the elements are copied. Does that mean the reference is copied (and therefore another entry on the heap is created) or the object itself is being copied? As far as I know, Object and therefore Object[] are implemented as a reference type. So assigning a new value to 'items' would allow the garbage collector to find that the old 'item' is no longer referenced and can therefore be collected. In my eyes, this the codesample does not produce a memory leak. Could somebody prove me wrong? =) import java.util.Arrays; public class Foo { private Object[] items; private int size=0; private static final int ISIZE=10; public Foo() { items= new Object[ISIZE]; } public void push(final Object o){ checkSize(); items[size++]=o; } public Object pop(){ if (size==0) throw new ///... return items[--size]; } private void checkSize(){ if (items.length==size){ items=Arrays.copyOf(items,2 * size+1); } } }

    Read the article

  • JVM CMS Garbage Collecting Issues

    - by jlintz
    I'm seeing the following symptoms on an application's GC log file with the Concurrent Mark-Sweep collector: 4031.248: [CMS-concurrent-preclean-start] 4031.250: [CMS-concurrent-preclean: 0.002/0.002 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 4031.250: [CMS-concurrent-abortable-preclean-start] CMS: abort preclean due to time 4036.346: [CMS-concurrent-abortable-preclean: 0.159/5.096 secs] [Times: user=0.00 sys=0.01, real=5.09 secs] 4036.346: [GC[YG occupancy: 55964 K (118016 K)]4036.347: [Rescan (parallel) , 0.0641200 secs]4036.411: [weak refs processing, 0.0001300 secs]4036.411: [class unloading, 0.0041590 secs]4036.415: [scrub symbol & string tables, 0.0053220 secs] [1 CMS-remark: 16015K(393216K)] 71979K(511232K), 0.0746640 secs] [Times: user=0.08 sys=0.00, real=0.08 secs] The preclean process keeps aborting continously. I've tried adjusting CMSMaxAbortablePrecleanTime to 15 seconds, from the default of 5, but that has not helped. The current JVM options are as follows... Djava.awt.headless=true -Xms512m -Xmx512m -Xmn128m -XX:MaxPermSize=128m -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:BiasedLockingStartupDelay=0 -XX:+DoEscapeAnalysis -XX:+UseBiasedLocking -XX:+EliminateLocks -XX:+CMSParallelRemarkEnabled -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:+PrintHeapAtGC -Xloggc:gc.log -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenPrecleaningEnabled -XX:CMSInitiatingOccupancyFraction=50 -XX:ReservedCodeCacheSize=64m -Dnetworkaddress.cache.ttl=30 -Xss128k It appears the concurrent-abortable-preclean never gets a chance to run. I read through http://blogs.sun.com/jonthecollector/entry/did_you_know which had a suggestion of enabling CMSScavengeBeforeRemark, but the side effects of pausing did not seem ideal. Could anyone offer up any suggestions? Also I was wondering if anyone had a good reference for grokking the CMS GC logs, in particular this line: [1 CMS-remark: 16015K(393216K)] 71979K(511232K), 0.0746640 secs] Not clear on what memory regions those numbers are referring to.

    Read the article

  • Java without gc - io

    - by Dan
    Hi Guys I would like to run a Java program with garbage collection switched off. Managing memory in my own code is not so difficult. However the program needs quite a lot of I/O. Is there any way (short of using JNI for all I/O operations) that I could achieve this using pure Java? Thanks Daniel

    Read the article

  • How does heap compaction work quickly?

    - by Mason Wheeler
    They say that compacting garbage collectors are faster than traditional memory management because they only have to collect live objects, and by rearranging them in memory so everything's in one contiguous block, you end up with no heap fragmentation. But how can that be done quickly? It seems to me that that's equivalent to the bin-packing problem, which is NP-hard and can't be completed in a reasonable amount of time on a large dataset within the current limits of our knowledge about computation. What am I missing?

    Read the article

  • PDF has garbled text when copy pasting

    - by ngm
    I'm trying to copy and paste text from a PDF file. However, whenever I paste the original text it is a huge mess of garbled characters. The text looks like the following (this is just one small extract): 4$/)5=$13! ,4&1*%-! )5'$! 1$2$)&,$40! 65))! .*5)1! -#$! )/'8*/8$03! (4/+$6&4;0!/'1!-&&)0!*0$1!.9!/,,)5%/-5&'!1$2$)&,$403!5'!+*%#!-#$! 0/+$!6/9! -#/-! &,$4/-5'8! 090-$+! 1$2$)&,$40! .*5)1!1$25%$! 1452$40! /'1! &-#$4! 090-$+! 0&(-6/4$! %&+,&'$'-0! *0$1! .9! /,,)5%/-5&'! 1$2$)&,$40!-&1/97!"#$!+5M!&(!,4&1*%-!)5'$!/'1!,4&1*%-!1$2$)&,$40! 65))! .$!+*%#!+&4$! $2$')9! ./)/'%$13! #&6$2$43! -#/'! -#$!+5M! &(! &,$4/-5'8!090-$+!/'1!/,,)5%/-5&'!1$2$)&,$40!-&1/97! )*+*+, C<88,?>8513AG<5A14, I've tried it in both Adobe and Foxit PDF readers. I did a 'Save as text' in Adobe Reader and the resultant text file is the same garbled text. Any ideas how I can get this text out non-garbled? (Other than manual typing... there's a lot of text to extract.)

    Read the article

  • exc_bad_access on insertNewObjectForEntityForName:inManagedObjectContext

    - by matthewc
    I have a garbage collected Cocoa application built on 10.5 frameworks. In an NSOperation In a loop I am quickly creating hundreds of NSManagedObjects. Frequently the creation of those NSManagedObejcts will crash with a exc_bad_access error. for (offsetCount; offsetCount < [parsedData count]; offsetCount++) { NSManagedObject *child = [NSEntityDescription insertNewObjectForEntityForName:@"Thread" inManagedObjectContext:[self moc]]; Thumbnail *thumb = [Thumbnail insertInManagedObjectContext:[self moc]]; Image *image = [Image insertInManagedObjectContext:[self moc]]; ... } Thumbnail and Image are both subclasses of NSManagedObject generated with mogenerator. insertInManagedObjectContext: looks like NSParameterAssert(moc_); return [NSEntityDescription insertNewObjectForEntityForName:@"Thumbnail" inManagedObjectContext:moc_]; NSParameterAssert(moc_); return [NSEntityDescription insertNewObjectForEntityForName:@"Image" inManagedObjectContext:moc_]; The NSManagedObjectContext returned by [self moc] is created for the NSOperation with NSPersistentStoreCoordinator *coord = [(MyApp_AppDelegate *)[[NSApplication sharedApplication] delegate] persistentStoreCoordinator]; self.moc = [[NSManagedObjectContext alloc] init]; [self.moc setPersistentStoreCoordinator:coord]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(contextDidSave:) name:NSManagedObjectContextDidSaveNotification object:self.moc]; [self.moc setMergePolicy:NSMergeByPropertyObjectTrumpMergePolicy]; [self.moc setUndoManager:nil]; [self.moc setRetainsRegisteredObjects:YES]; moc is defined as (nonatomic, retain) and synthesized. As far as I can tell it, the persistent store and my appDelegate have no reason to be and are not being garbage collected. The stack trace looks like Thread 2 Crashed: Dispatch queue: com.apple.root.default-priority 0 libauto.dylib 0x00007fff82d63600 auto_zone_root_write_barrier + 688 1 libobjc.A.dylib 0x00007fff826f963b objc_assign_strongCast_gc + 59 2 com.apple.CoreFoundation 0x00007fff88677068 __CFBasicHashAddValue + 504 3 com.apple.CoreFoundation 0x00007fff88676d2f CFBasicHashAddValue + 191 4 com.apple.CoreData 0x00007fff82bdee5e -[NSManagedObjectContext(_NSInternalAdditions) _insertObjectWithGlobalID:globalID:] + 190 5 com.apple.CoreData 0x00007fff82bded24 -[NSManagedObjectContext insertObject:] + 148 6 com.apple.CoreData 0x00007fff82bbd75c -[NSManagedObject initWithEntity:insertIntoManagedObjectContext:] + 716 7 com.apple.CoreData 0x00007fff82bdf075 +[NSEntityDescription insertNewObjectForEntityForName:inManagedObjectContext:] + 101 8 com.yourcompany.MyApp 0x000000010002c7a7 +[_Thumbnail insertInManagedObjectContext:] + 256 (_Thumbnail.m:14) 9 com.yourcompany.MyApp 0x000000010002672d -[ThreadParse main] + 10345 (B4ChanThreadParse.m:174) 10 com.apple.Foundation 0x00007fff85ee807e -[__NSOperationInternal start] + 698 11 com.apple.Foundation 0x00007fff85ee7d23 ____startOperations_block_invoke_2 + 99 12 libSystem.B.dylib 0x00007fff812bece8 _dispatch_call_block_and_release + 15 13 libSystem.B.dylib 0x00007fff8129d279 _dispatch_worker_thread2 + 231 14 libSystem.B.dylib 0x00007fff8129cbb8 _pthread_wqthread + 353 15 libSystem.B.dylib 0x00007fff8129ca55 start_wqthread + 13 My app is crashing in other places with exc_bad_access but this is code that it happens most with. All of the stack traces look similar and have something to do with CFHash. Any help would be appreciated.

    Read the article

  • iPad - supports Garbage Collector?

    - by krasnyk
    I know you can't use GC in iPhone applications cause iPhone does not have enough resources to enable that - it would kill the performence. What about iPad. I know they run iPhone OS too, does that mean that CG can't be enabled on the iPad as well?

    Read the article

  • Can running object be garbage collected?

    - by Kugel
    I have a simple class: public class Runner { public void RunAndForget(RunDelegate method) { ThreadPool.QueueUserWorkItem(new WaitCallback(Run), method); } private void Run(object o) { ((RunDelegate )o).Invoke(); } } And if I use this like so: private void RunSomethingASync() { Runner runner = new Runner(); runner.FireAndForget(new RunDelegate(Something)); } Is there any danger using it like this? My C++ guts tell me that runner object should be destroyed after RunSomethingASync is finished. Am I right? What happens then to the method running on different thread? Or perhaps it is other way around and runner will not be collected? That would be a problem considering I may call RunSomethingASync() many times.

    Read the article

  • PDF has garbled text when copy pasting

    - by ngm
    I'm trying to copy and paste text from a PDF file. However, whenever I paste the original text it is a huge mess of garbled characters. The text looks like the following (this is just one small extract): 4$/)5=$13! ,4&1*%-! )5'$! 1$2$)&,$40! 65))! .*5)1! -#$! )/'8*/8$03! (4/+$6&4;0!/'1!-&&)0!*0$1!.9!/,,)5%/-5&'!1$2$)&,$403!5'!+*%#!-#$! 0/+$!6/9! -#/-! &,$4/-5'8! 090-$+! 1$2$)&,$40! .*5)1!1$25%$! 1452$40! /'1! &-#$4! 090-$+! 0&(-6/4$! %&+,&'$'-0! *0$1! .9! /,,)5%/-5&'! 1$2$)&,$40!-&1/97!"#$!+5M!&(!,4&1*%-!)5'$!/'1!,4&1*%-!1$2$)&,$40! 65))! .$!+*%#!+&4$! $2$')9! ./)/'%$13! #&6$2$43! -#/'! -#$!+5M! &(! &,$4/-5'8!090-$+!/'1!/,,)5%/-5&'!1$2$)&,$40!-&1/97! )*+*+, C<88,?>8513AG<5A14, I've tried it in both Adobe and Foxit PDF readers. I did a 'Save as text' in Adobe Reader and the resultant text file is the same garbled text. Any ideas how I can get this text out non-garbled? (Other than manual typing... there's a lot of text to extract.)

    Read the article

  • Can .NET Task instances go out of scope during run?

    - by Henry Jackson
    If I have the following block of code in a method (using .NET 4 and the Task Parallel Library): var task = new Task(() => DoSomethingLongRunning()); task.Start(); and the method returns, will that task go out of scope and be garbage collected, or will it run to completion? I haven't noticed any issues with GCing, but want to make sure I'm not setting myself up for a race condition with the GC.

    Read the article

  • Frequent occurence of FULL GC.

    - by Viji
    Hi, There is a frequent occurence of FULL GC in our system. We are using Java application running on Tomcat server. Our application is running using internal load balancer setup. We are seeing lot of Full GC's in the server logs due to which the application is hung and Proxy errors are occured. The Java parameter values we are using are: Webapp wrapper: wrapper.java.additional.4=-Xms382M wrapper.java.additional.5=-Xmx1024M Backapp wrapper: wrapper.java.additional.4=-Xms382M wrapper.java.additional.5=-Xmx1024M The error found in webapp wrapper logs: INFO | jvm 1 | 2010/11/26 09:33:19 | [PSYoungGen: 1398460K-140291K(1514624K)] 4623364K-3491394K(5009920K), 0.7285303 secs] [Times: user=1.42 sys=0.00, real=0.72 secs] INFO | jvm 1 | 2010/11/26 09:33:19 | 68539.126: [Full GC DEBUG | wrapperp | 2010/11/26 09:33:19 | send a packet PING : ping Tried to change the JVM values to increase the heap size. But of no use. I suspect that there could be some other reason other than these parameters which is causing the issue. Can anyone please help me on this?

    Read the article

  • Unicode string turns garbage at serverside.

    - by this. __curious_geek
    I have a situation. I have a label in ASP.NET 2.0(C#). The label should display a dutch language text that is "Sähköpostiosoite", I tried setting the Label.Text both from markup and code-behind but what I see in the browser response is "Sähköpostiosoite". Originally assigned string "Sähköpostiosoite" get replaced with "Sähköpostiosoite". I have no idea why this happens can you please help me diagnose the problem ??

    Read the article

  • how to display numbers without garbage numbers?

    - by Medeti Naveen Kumar
    Hi friends, whenever i press the numbers in text filed upto 9 numbers my textfield has taken right values but i press 10 th number.i have found duplicate number. in my header file i declare a pressnumber is "long long int" -(IBAction)press:(id)sender{ pressNumber = pressNumber*10 + (int)[sender tag]; phonenumber.text = [NSString stringWithFormat:@"%d",currentNumber]; } i want to enter a phone number in my textfiled but it is not taken 10 right numbers. Thanking you,

    Read the article

  • How to Dispose myClass with Garbage Collecter C#

    - by Ibrahim AKGUN
    Hi, I have a class and got a method that doin so many things in memory and need to be disposed when its jobs done.But i have looked for MSDN for solution.There is an example thats not solved my problem.When my Class is instanced and run this method my memory is getting bigger and bigger.How can i Dispose it when its job done ? Here is my CODES ; class Deneme { public Deneme() { } ~Deneme() { GC.Collect(); GC.SuppressFinalize(this); } public void TestMetodu() { System.Windows.Forms.MessageBox.Show("Test"); // This is my method that doing big jobs :) } } Deneme CCCX = new Deneme(); CCCX.TestMetodu(); CCCX = null; So i cant dispose it with this.

    Read the article

  • AS3: why is this happening?

    - by Bin Chen
    Hi, I just encounter a strange problem: var a:ClassA = new ClassA; var b:ClassA = a; The program keeps running sometime, the a = null, b = null. The program is a complex one, I am sure that no part will touch a, and b. My question is, will the runtime(garbage collector) to collect the memory of "a" and then assign a and b to null? I am confused, thanks!

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >