Search Results

Search found 12267 results on 491 pages for 'out of memory'.

Page 109/491 | < Previous Page | 105 106 107 108 109 110 111 112 113 114 115 116  | Next Page >

  • Out of Memory on Update or Delete of Service Reference

    - by Kelly
    I have a Service Reference for a WCF project that has just over a hundred endpoints in my ServiceHost web.config. Every time I attempt to update or delete the Service Reference, it fails with an out of memory exception. I am running Vista Ultimate SP2 64-bit with 8GB RAM. I can work around it by going outside the project and deleting the Service References folder, then coming back in and re-adding the Reference. Is this the only workaround that you know of? Thanks!

    Read the article

  • Write wave files to memory in Java

    - by Cliff
    I'm trying to figure out why my servlet code creates wave files with improper headers. I use: AudioSystem.write( new AudioInputStream( new ByteArrayInputStream(memoryBytes), new AudioFormat(22000, 16, 1, true,false), memoryBytes.length ), AudioFileFormat.Type.WAVE, servletOutputStream ); taking a byte array from memory containing raw PCM samples and a servlet output stream that gets returned to the client. In the result I get a normal wave file but with zeros in the chunk size fields. Is the API broken? I would think that the size could be filled in using the size passed in the audio input stream. But now, after typing this out I'm thinking its not making this info available to the outer write() method on AudioSystem. It seems like the AudioSystem.write call needs a size parameter unless it is able to pull the size from the stream... which wouldn't work with an arbitrary sized stream. Does anyone know how to make this example work?

    Read the article

  • Create an assembly in memory

    - by Jared I
    I'd like to create an assembly in memory, using an using the classes in Reflection.Emit Currently, I can create the assembly and get it's bytes using something like AssemblyBuilder builder = AppDomain.CurrentDomain.DefineDynamicAssembly(..., AssemblyBuilderAccess.Save); ... create the assembly ... builder.Save(targetFileName); using(FileStream fs = File.Open(targetFileName, FileMode.Open)) { ... read the bytes from the file stream ... } However, it does so by creating a file on the local filesystem. I don't actually need the file, just the bytes that would be in the file. Is it possible to create the assembly without writing any files?

    Read the article

  • What are the pros and cons of using an in memory DB rather than a ThreadLocal

    - by Pangea
    We have been using ThreadLocal so far to carry some data so as to not clutter the API. However below are some of issues of using thread local that which I don't like: 1) Over the years the data items being carried in thread local has increased 2) Since we started using threads (for some light weight processing), we have also migrating these data to the threads in the pool and copying them back again I am thinking of using an in memory DB for these (we doesn't want to add this to the API). I wondering if this approach is good. What are the pros and cons? thx in advance.

    Read the article

  • HSQLDB Constraint Violation & SQL Query Log for an HSQLDB in-memory setup

    - by shipmaster
    We have a setup where we are using an embedded HSQLDB for backing Hibernate/JPA unit tests in java, and we are using the in-memory database mode since we simply want the database thrown away after the test run. My problem is that one of the tests is failing due to a constraint violation and HSQLDB lists the column as SYS_CT_286, and the query that appears in the log is the prepared statement where I cant see what the actual parameter values are (they are replaced by '?'). My questions are: 1- Is there a way in which I can see the actual SQL being executed? (like the mysql query log for example?). 2- What exactly is SYS_CT_286? it is not one of my columns, is it a generated column? is there something obvious that may be wrong with it? Thanks.

    Read the article

  • AVAudioPlayer Memory Leak - Media Player Framework

    - by Krishnan
    Hi Friends, I am using AVAudioPlayer object to play an audio. I create an audioPlayer object initially. I play an animation and when ever animation starts I play the audio and pause the audio when the animation is finished. I initially found three memory Leaks using Instruments. (The responsible caller mentioned was RegisterEmbedCodecs). After suggestion from a "ahmet emrah" in this forum to add MediaPlayer framework, the number of leaks reduced to one. And is there any way to completely get rid of it? Thanks and regards, krishnan.

    Read the article

  • realloc()ing memory for a buffer used in recv()

    - by Hristo
    I need to recv() data from a socket and store it into a buffer, but I need to make sure get all of the data so I have things in a loop. So to makes sure I don't run out of room in my buffer, I'm trying to use realloc to resize the memory allocated to the buffer. So far I have: // receive response int i = 0; int amntRecvd = 0; char *pageContentBuffer = (char*) malloc(4096 * sizeof(char)); while ((amntRecvd = recv(proxySocketFD, pageContentBuffer + i, 4096, 0)) > 0) { i += amntRecvd; realloc(pageContentBuffer, 4096 + sizeof(pageContentBuffer)); } However, this doesn't seem to be working properly since Valgrind is complaining "valgrind: the 'impossible' happened:". Any advice as to how this should be done properly? Thanks, Hristo

    Read the article

  • Memcache won't flush or clear memory

    - by pedalpete
    I've been trying to clear my memcache as I'm noticing the storage taking up almost 30% of server memory when using ps -aux. So I ran the following php code. $memcache = new Memcache; $memcache-connect("localhost",11211); $memcache-flush(); print_r($memcache-getStats()); This results in the output of ( [pid] = 4936 [uptime] = 27318915 [time] = 1255318611 [version] = 1.2.2 [pointer_size] = 64 [rusage_user] = 9.659531 [rusage_system] = 49.770433 [curr_items] = 57864 [total_items] = 128246 [bytes] = 1931734247 [curr_connections] = 1 [total_connections] = 128488 [connection_structures] = 17 [cmd_get] = 170288 [cmd_set] = 128246 [get_hits] = 45464 [get_misses] = 124824 [evictions] = 1009 [bytes_read] = 5607431213 [bytes_written] = 1806543589 [limit_maxbytes] = 2147483648 [threads] = 1 ) This should be fairly basic, but clearly, I'm missing something.

    Read the article

  • Lucene.Net memory consumption and slow search when too many clauses used

    - by Umer
    I have a DB having text file attributes and text file primary key IDs and indexed around 1 million text files along with their IDs (primary keys in DB). Now, I am searching at two levels. First is straight forward DB search, where i get primary keys as result (roughly 2 or 3 million IDs) Then i make a Boolean query for instance as following +Text:"test*" +(pkID:1 pkID:4 pkID:100 pkID:115 pkID:1041 .... ) and search it in my Index file. The problem is that such query (having 2 million clauses) takes toooooo much time to give result and consumes reallly too much memory.... Is there any optimization solution for this problem ?

    Read the article

  • XmlDocument caching memory usage

    - by mdsharpe
    We are seeing very high memory usage in .NET web applications which use XmlDocument. A small (~5MB) XML document is loaded into an XmlDocument object and stored in HttpContext.Cache for easy querying and XSLT transformation on each page load. The XML is modified on disk periodically so a cache has a dependency on the file. Such an application appears to be using hundreds of megabytes of RAM. I have experimented with requesting garbage collection on each request start, and this keeps the RAM usage far lower but I cannot imagine this is good practise. Does anyone have any suggestions as to how we can achieve the same goal but with lower RAM usage?

    Read the article

  • NSDate & Memory management

    - by iFloh
    Hi, memory management still gives me grief. This time it is an NSDate iVar that I init using NSDate *myNSDate = [[NSDate date] firstDayOfMonth]; with a method call to - (NSDate *)firstDayOfMonth { NSDateComponents *tmpDateComponents = [[NSCalendar currentCalendar] components:NSYearCalendarUnit | NSMonthCalendarUnit | NSEraCalendarUnit | NSWeekCalendarUnit | NSWeekdayOrdinalCalendarUnit fromDate:self]; [tmpDateComponents setDay:1]; [tmpDateComponents setHour:0]; [tmpDateComponents setMinute:0]; [tmpDateComponents setSecond:0]; return [[NSCalendar currentCalendar] dateFromComponents:tmpDateComponents]; } At the end of the init call the retain count is at 1 (Note the iVar is not defined as a property). When I step into the viewWillAppear method the myNSDate has vanished. I tried to do an explicit retain on it, but that only lasts until I update the iVar using the above method again. I though - ok - I add the retain to the return of the function, but that makes the leak analyser throw up an error. What am I doing wrong?

    Read the article

  • Memory section handling error

    - by Basilevs
    I'm getting a link time error: WARNING: /home/gulevich/development/camac-fedorov/camac/linux/k0607-lsi6/camac-k0607-lsi6.o (.ctors): unexpected non-allocatable section. Did you forget to use "ax"/"aw" in a .S file? Note that for example <linux/init.h> contains section definitions for use in .S files. The code causing the error (assembly in C source): # if defined(__ELF__) # define __SECTION_FLAGS ", \"aw\" , @progbits" /* writable flag needed for ld ".[cd]tors" sections bug workaround) */ # elif defined(__COFF__) # define __SECTION_FLAGS ", \"dr\"" /* untested, may be writable flag needed */ # endif asm ( ".section .ctors" __SECTION_FLAGS "\n" ".globl __ctors_begin__\n" "__ctors_begin__:\n" ".previous\n" ); Is there any way to fix this? The idea is to put a varaible __ctors_begin__ at the beginning of a certain memory section. This code is a legacy that worked fine using a different build system and older compiler. Meaning of this assembly code explained in an answer to my previous question.

    Read the article

  • Struts/JSP/J2EE performance and memory profiling and issues

    - by Berlin Brown
    We are using Struts and having performance issues. And making heavy use of jsp includes, tiles, EL expressions. I am sure this is eating up a lot of memory and processing time. What are some approaches to profile the JSP page? What tools could I use? What should I look for when profiling? I have seen the code generated JSP Java Servlet Code and I see the bottlenecks but would rather measure it more accurately. This is under JDK1.5 and IBM Websphere 6.1 (RAD7)

    Read the article

  • Can we view objects in the JVM memory?

    - by Sebastien Lorber
    Hey, At work we found that on some instances (particulary the slow ones) we have a different behaviour, acquired at the reboot. We guess a cache is not initialized correctly, or maybe a concurrency problem... Anyway it's not reproductible in any other env than production. We actually don't have loggers to activate... it's an old component... Thus i'd like to know if there are tools that can help us to see the different objets present in the JVM memory in order to check the content of the cache... Thank you!

    Read the article

  • Static DB Provider in ASP.NET MVC Causing Memory Leak

    - by user364685
    Hi, I have got an app I'm going to write in ASP.NET MVC and I want to create a DatabaseFactory object something like this:- public class DatabaseFactory { private string dbConn get { return <gets from config file>; } public IDatabaseTableObject GetDatabaseTable() { IDatabaseTableObject databaseTableObject = new SQLDatabaseObject(dbConn); return databaseTableObject; } } and this works fine, but I obviously have to instantiate the DatabaseFactory in every controller that needs it. If I made this static, so I could, in theory just call DatabaseFactory.GetDatabaseTable() it would cause a memory leak, wouldn't it?

    Read the article

  • Does malloc() allocate a contiguous block of memory?

    - by user66854
    I have a piece of code written by a very old school programmer :-) . it goes something like this typedef struct ts_request { ts_request_buffer_header_def header; char package[1]; } ts_request_def; ts_request_buffer_def* request_buffer = malloc(sizeof(ts_request_def) + (2 * 1024 * 1024)); the programmer basically is working on a buffer overflow concept. I know the code looks dodgy. so my questions are: Does malloc always allocate contiguous block of memory ?. because in this code if the blocks are not contiguous , the code will fail big time Doing free(request_buffer) , will it free all the bytes allocated by malloc i.e sizeof(ts_request_def) + (2 * 1024 * 1024), or only the bytes of the size of the structure sizeof(ts_request_def) Do you see any evident problems with this approach , i need to discuss this with my boss and would like to point out any loopholes with this approach

    Read the article

  • How to convert code to properly release memory

    - by BankStrong
    I've taken over a code base that has subtle flaws - audio player goes mute, unlogged crashes, odd behavior, etc. I found a way to provoke one instance of the problem and tracked it to this code snippet: NSURL *soundURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:[[soundsToPlay objectAtIndex:count] description] ofType:@"mp3"]]; self.audioPlayer = nil; self.audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:soundURL error:nil]; self.audioPlayer.delegate = self; AudioSessionSetActive(YES); [audioPlayer play]; When I comment out the 2nd line (nil) and add a release to the end, this problem stops. [self.audioPlayer release]; Where do I go from here? Nils are used in a similar fashion throughout the code (and may cause similar problems) - is there a safe way to remove them? I'm new to memory management - how can I discern proper nil usage from bad nil usage?

    Read the article

  • Insufficient memory to continue the execution of the program

    - by Suman
    My Application (Vb.net, Access 2003/2007) is to scan Access Database files for activex controls and to generate report accordingly. Problem: Getting an error like: "Insufficient memory to continue the execution of the program." The above error occurs while scanning for older version of Access files like prior to office 2000. And the line of code where I get this is as follows: Dim oForm As Access.Form Dim oAccess as Access.Application oForm = oAccess.Forms(objForms.Name) But it opens the file and form as well. Need Help: Whether it is possible to read the file (Access Forms and Reports) or not? Please provide me reference or any solution.

    Read the article

  • Require Integer Value not Memory Address whilst avoiding Invalid receiver type compiler warning

    - by Dave Anderson
    I have the following code; int days = [[SettingsUtils daysToRetainHistory] intValue]; [retainHistory setText:[NSString stringWithFormat:@"Days to retain History: %d", days]]; [daysToRetainHistory setValue:days animated:NO]; where [SettingsUtils daysToRetainHistory] is as follows; + (int) daysToRetainHistory { return (int)[[NSUserDefaults standardUserDefaults] objectForKey:@"CaseBaseDaysToRetainHistory"]; } I get the compiler warning Invalid receiver type 'int' because I call intValue on an int but unless I do this I can't seem to get the integer value out and always end up with the memory address i.e. 98765432 instead of 9 which ruins the UILabel display [retainHistory] and the UISlider [daysToRetainHistory] value. How do I avoid the compiler warning and still get my integer value in the label and the necessary float value for setting the UISlider value?

    Read the article

  • How to store images efficiently (memory-wise) while still being able to process them

    - by Sheeo
    I'm working on a silverlight project where users get to create their own Collages. The problem When loading images into memory, I'm using BitmapImage so that they can be displayed directly with the Image control--but they're locked in afterwards. So I've tried storing them seperately aswell, but that just sucks up huge amounts of RAM. So in short, is there a class that'll let me store JPEG images, be able to show them with the image control, and still be able to export it afterwards? All this needs to be efficient--i.e. I'd rather not want any copying to ARGB arrays or use the WriteableBitmap to copy them over. I require to work with large collections of images, up to 300 at most. Any help apreciated!

    Read the article

  • SDCC and malloc() - allocating much less memory than is available

    - by Duncan Bayne
    When I run compile this code with SDCC 3.1.0, and run it on an Amstrad CPC 464 (under emulation, with WinCPC 0.9.26 running on Wine): void _test_malloc() { long idx = 0; while (1) { if (malloc(5)) { printf("%ld\r\n", ++idx); } else { printf("done"); break; } } } ... it consistently taps out at 92 malloc()s. I make that 460 bytes, which leads me to a couple of questions: What is malloc() doing on this system? I was sort of hoping for an order of magnitude more storage even on a 64kB system The behaviour is consistent on 64kB systems and 128kB systems; do I have to perform some sort of magic to access the additional memory, like manual bank switching?

    Read the article

  • Python 3.1 - Memory Error during sampling of a large list

    - by jimy
    The input list can be more than 1 million numbers. When I run the following code with smaller 'repeats', its fine; def sample(x): length = 1000000 new_array = random.sample((list(x)),length) return (new_array) def repeat_sample(x): i = 0 repeats = 100 list_of_samples = [] for i in range(repeats): list_of_samples.append(sample(x)) return(list_of_samples) repeat_sample(large_array) However, using high repeats such as the 100 above, results in MemoryError. Traceback is as follows; Traceback (most recent call last): File "C:\Python31\rnd.py", line 221, in <module> STORED_REPEAT_SAMPLE = repeat_sample(STORED_ARRAY) File "C:\Python31\rnd.py", line 129, in repeat_sample list_of_samples.append(sample(x)) File "C:\Python31\rnd.py", line 121, in sample new_array = random.sample((list(x)),length) File "C:\Python31\lib\random.py", line 309, in sample result = [None] * k MemoryError I am assuming I'm running out of memory. I do not know how to get around this problem. Thank you for your time!

    Read the article

  • how to get memory dump after blue screen

    - by user464164
    I'm getting a lovely BSOD on bootup (STOP: 0x0000007E) from a driver I'm writing, and would like to load up the memory dump for analysis. However, it's not getting dumped anywhere. Everything is setup correctly in the Startup and Recovery settings, but I get no dump file, and nothing in the event log stating a dump has taken place. It looks like a dump is not even occurring... I know the exact line of code causing it (a call to IoAttachDevice()), but am not sure why, and would like to view the DbgPrint output to see where exactly it's failing. Could Windows possibly be crashing before the dumping functionality is set up? If so, how do I get access to the state of the machine when the failure occurs? UPDATE: Other possibly useful information: I'm running Windows XP through VirtualBox on a Linux host.

    Read the article

  • WPF: Convert memory stream to BitmapImage?

    - by David Veeneman
    I have an image that was originally a PNG that I have converted to a byte[] and saved in a database. Originally, I simply read the PNG into a memory stream and converted the stream into a byte[]. Now I want to read the byte[] back and convert it to a BitmapImage, so that I can bind a WPF Image control to it. I am seeing a lot of contradictory and confusing code online to accomplish the task of converting a byte[] to a BitmapImage. I am not sure whether I need to add any code due to the fact that the image was originally a PNG. Can anyone provide the code to convert the stream to a BitmapImage? Thanks for your help.

    Read the article

  • Memory leak till crash due to HttpRequest

    - by Alex R.
    I played with HttpRequest and realized that the memory is not cleaned up after any request. After some time the running tab within Chrome will crash. Here is some testing code. Put a large sized file into the 'www' directory and set the URL in the code accordingly. import 'dart:async'; import 'dart:html'; void main() { const PATH = "http://127.0.0.1:3030/PATH_TO_FILE"; new Timer.periodic(new Duration(seconds:10), (Timer it)=>getString(PATH)); } void getString( String url){ HttpRequest.getString(url).then((String data){ }); } Is this really a bug or did I something wrong?

    Read the article

< Previous Page | 105 106 107 108 109 110 111 112 113 114 115 116  | Next Page >