Search Results

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

Page 211/491 | < Previous Page | 207 208 209 210 211 212 213 214 215 216 217 218  | Next Page >

  • In windbg, how do I get a heap header address from !heap -l results?

    - by Kevin
    I am playing around with windbg's !heap command, particular the "-l" switch which detects memory leaks. When -l does detect a leak, I am having problems navigating from its results to a stack trace for the source of the leak. Here is a snippet of the results from !heap -l 0:066 !heap -l Searching the memory for potential unreachable busy blocks. Entry User Heap Segment Size PrevSize Unused Flags 0324b500 0324b508 01580000 03230000 20 60 a busy 0324b520 0324b528 01580000 03230000 20 20 a busy 0324b5c8 0324b5d0 01580000 03230000 20 28 a busy Windbg's documentation for !heap tells me to use dt _DPH_BLOCK_INFORMATION with the header address, followed by dds with the blocks' StackTrace field. But the output for !heap -l doesn't specify a header address! It's only specififying Entry, User, Heap, and Segment. I've racked my brain looking over the other commands but can't figure out how to get the header address from any of these fields. Can someone help?

    Read the article

  • System architecture: simple approach for setting up background tasks behind a web application -- wil

    - by Tim Molendijk
    I have a Django web application and I have some tasks that should operate (or actually: be initiated) on the background. The application is deployed as follows: apache2-mpm-worker; mod_wsgi in daemon mode (1 process, 15 threads). The background tasks have the following characteristics: they need to operate in a regular interval (every 5 minutes or so); they require the application context (i.e. the application packages need to be available in memory); they do not need any input other than database access, in order to perform some not-so-heavy tasks such as sending out e-mail and updating the state of the database. Now I was thinking that the most simple approach to this problem would be simply to piggyback on the existing application process (as spawned by mod_wsgi). By implementing the task as part of the application and providing an HTTP interface for it, I would prevent the overhead of another process that is holding all of the application into memory. A simple cronjob can be setup that sends a request to this HTTP interface every 5 minutes and that would be it. Since the application process provides 15 threads and the tasks are quite lightweight and only running every 5 minutes, I figure they would not be hindering the performance of the web application's user-facing operations. Yet... I have done some online research and I have seen nobody advocating this approach. Many articles suggest a significantly more complex approach based on a full-blown messaging component (such as Celery, which uses RabbitMQ). Although that's sexy, it sounds like overkill to me. Some articles suggest setting up a cronjob that executes a script which performs the tasks. But that doesn't feel very attractive either, as it results in creating a new process that loads the entire application into memory, performs some tiny task, and destroys the process again. And this is repeated every 5 minutes. Does not sound like an elegant solution. So, I'm looking for some feedback on my suggested approach as described in the paragraph before the preceeding paragraph. Is my reasoning correct? Am I overlooking (potential) problems? What about my assumption that application's performance will not be impeded?

    Read the article

  • Catching java.lang.OutOfMemoryError

    - by dotsid
    Documentation for java.lang.Error says: An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch But as java.lang.Error is subclass of java.lang.Throwable I can catch this type of throwable. I understand why this is not good idea to catch this sort of exceptions. As far as I understand, if we decide to caught it, the catch handler should not allocate any memory by itself. Otherwise OutOfMemoryError will be thrown again. So, my question is: is there any real word scenarios when catching java.lang.OutOfMemoryError may be a good idea? if we catching java.lang.OutOfMemoryError how can we sure that catch handler doesn't allocate any memory by itself (any tools or best practicies)? Thanks a lot.

    Read the article

  • Fast permutation -> number -> permutation mapping algorithms

    - by ijw
    I have n elements. For the sake of an example, let's say, 7 elements, 1234567. I know there are 7! = 5040 permutations possible of these 7 elements. I want a fast algorithm comprising two functions: f(number) maps a number between 0 and 5039 to a unique permutation, and f'(permutation) maps the permutation back to the number that it was generated from. I don't care about the correspondence between number and permutation, providing each permutation has its own unique number. So, for instance, I might have functions where f(0) = '1234567' f'('1234567') = 0 The fastest algorithm that comes to mind is to enumerate all permutations and create a lookup table in both directions, so that, once the tables are created, f(0) would be O(1) and f('1234567') would be a lookup on a string. However, this is memory hungry, particularly when n becomes large. Can anyone propose another algorithm that would work quickly and without the memory disadvantage?

    Read the article

  • openmp in mex : stackoverflow error

    - by Edwin
    i have got the following fraction of code that getting me the stack overflow error #pragma omp parallel shared(Mo1, Mo2, sum_normalized_p_gn, Data, Mean_Out,Covar_Out,Prior_Out, det) private(i) num_threads( number_threads ) { //every thread has a new copy double* normalized_p_gn = (double*)malloc(NMIX*sizeof(double)); #pragma omp critical { int id = omp_get_thread_num(); int threads = omp_get_num_threads(); mexEvalString("drawnow"); } #pragma omp for //some parallel process..... } the variables declared in the shared are created by malloc. and they consumes with large amount of memory there are 2 questions regarding to the above code. 1) why this would generate the stack overflow error( i.e. segmentation fault) before it goes into the parallel for loop? it works fine when it runs in the sequential mode.... 2) am i right to dynamic allocate memory for each thread like "normalized_p_gn" above? Regards Edwin

    Read the article

  • MemSet & MemCopy

    - by pws5068
    I'm writing a memory allocator, and I need a way to store an integer inside of a chunk of memory. This integer will represent the size of the block so I can navigate to the end given the pointer to the beginning. Here's my test example: head_ptr = (char*) malloc(4*1024*1024); // Allocate 4MB memset(head_ptr,12345,sizeof(int)); // Set Address head_ptr = 12345 memcpy(testInt,head_ptr,sizeof(int)); // Set testInt = head_ptr printf("testInt = %i",testInt); This throws a segmentation fault on the second to last line. Does what I'm trying to do make sense? If so, what is the correct approach?

    Read the article

  • Reading multiple files with PHPExcel

    - by KaOSoFt
    Hello there. I just recently started using this library (the one from CodePlex), but I ran into some issues. My goal is to use it so I can process some data from multiple Excel files, and send such data to a database, per file. I'm doing something like: foreach( $file_list as $file ) { $book = PHPExcel_IOFactory::load( $path . $file ); } So, inside the foreach I'm (for now) just showing the data to the user, but after five files, I get a memory error: Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 50688 bytes) in /var/www/test/classes/PHPExcel/Shared/OLERead.php on line 76 Is there a way to __destruct the object after each file is loaded, so space is reserved (made free) for the next file, instead of accumulating it, or do you rather know of a reason and work-around for this? Please let me know any suggestions you have. Thanks in advance.

    Read the article

  • Is there a difference between boost iostream mapped file and boost interprocess mapped file?

    - by Yijinsei
    I want to create a mapped binary file into memory; however I am not sure how to create the file to be mapped into the system. I read the documentation several times and realize there are 2 mapped file implementations, one in iostream and the other in interprocess. Do you guys have any idea on how to create a mapped file into shared memory? I am trying to allow a multi-threaded program to read an array of large double written in a binary file format. Also what is the difference between the mapped file in iostream and interprocess?

    Read the article

  • Lock Free Queue -- Single Producer, Multiple Consumers

    - by Shirish
    Hello, I am looking for a method to implement lock-free queue data structure that supports single producer, and multiple consumers. I have looked at the classic method by Maged Michael and Michael Scott (1996) but their version uses linked lists. I would like an implementation that makes use of bounded circular buffer. Something that uses atomic variables? On a side note, I am not sure why these classic methods are designed for linked lists that require a lot of dynamic memory management. In a multi-threaded program, all memory management routines are serialized. Aren't we defeating the benefits of lock-free methods by using them in conjunction with dynamic data structures? I am trying to code this in C/C++ using pthread library on a Intel 64-bit architecture. Thank you, Shirish

    Read the article

  • expr non-numeric argument shell script

    - by Kimi
    The below check is not working : expr non-numeric argument shell script. Always it is going to else. Please tell me what is the mistake. Earlier I was no using while so the same thing was woring fine now suddenly when I did put it in the while loop it is no working. echo "`${BOLD}` ***** Checking Memory Utilization User*****`${UNBOLD}`" echo "===================================================" IFS='|' cat configMachineDetails.txt | grep -v "^#" | while read MachineType UserName MachineName do export MEMORY_USAGE1=`ssh -f -T ${UserName}@${MachineName} prstat -t -s rss 1 2 | tr '%' ' '| awk '$5>5.0'` export LEN=`echo "$MEMORY_USAGE1"|wc -l` export CNPROC=`echo "$MEMORY_USAGE1"|grep "NPROC"|wc -l` export CTotal=`echo "$MEMORY_USAGE1"|grep "Total"|wc -l` **if [ $LEN = `expr $CNPROC + $CTotal` ] then echo "`${BOLD}`**************All usages are normal !!!!!! *************`${UNBOLD}`" else echo "`${BOLD}`**** Memory(%) is more than 5% in MachineType $MachineType UserName $UserName MachineName $MachineName *******`${UNBOLD}`" echo "====================================================" echo "$MEMORY_USAGE1" fi** done

    Read the article

  • Why does my UITableView change from UITableViewStyleGrouped to UITableViewStylePlain

    - by casper
    My application has a view controller that extends UITableViewController. The initialization method looks like this: - (id)initWithCoder:(NSCoder*)coder { if (self = [super initWithCoder:coder]) { self.tableView = [[UITableView alloc] initWithFrame:self.tableView.frame style:UITableViewStyleGrouped]; } return self; } When the view is initially loaded, it's displayed as UITableViewStyleGrouped. However, if my app ever receives a low memory warning, the above view changes to UITableViewStylePlain. There is no associated xib file with the View/Controller. The viewDidUnload and didReceiveMemoryWarning methods are straightforward: - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } My question is, why does the table style change when I receive a memory warning?

    Read the article

  • .NET Debugging - System.Threading.ExecutionContext.runTryCode

    - by moogs
    We have this bug that only appears 30% of the time for the Release build. Opening the crash dump in WinDbg (snipped "!analyze -v" output): FAULTING_IP: +4 00000000`00000004 ?? ??? EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff) ExceptionAddress: 0000000000000004 ExceptionCode: c0000005 (Access violation) ExceptionFlags: 00000000 NumberParameters: 2 Parameter[0]: 0000000000000008 Parameter[1]: 0000000000000004 Attempt to execute non-executable address 0000000000000004 ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. WRITE_ADDRESS: 0000000000000004 MANAGED_STACK: (TransitionMU) 0000000024B9E370 000007FEEDA1DD38 mscorlib_ni!System.Threading.ExecutionContext.runTryCode(System.Object)+0x178 (TransitionUM) (TransitionMU) 0000000024B9DFB0 000007FF00439010 MyLibrary!DocInfo.IsStatusOK()+0x30 Now, IsStatusOK() just calls PrintSystemJobInfo.Get(), but that doesn't seem to even appear in the stack. Any ideas on how to debug this? I'm sure runTryCode() is really not the problem...but..I'm stuck. Thanks! (I'm really groping here).

    Read the article

  • How can I prevent IIS from trying to load a dll?

    - by Abtin Forouzandeh
    My project is a Speech Server application using Windows Workflow. It runs as an app under IIS. It supports a plug-in system. Here is what is happening: Load DLL into memory and set the type on an InvokeWorkflow control. When the InvokeWorkflow control runs, it appears to correctly instantiate the workflow from the loaded assembly - it completes the Initialize method. Everything crashes an burns, the target workflow is never executed. I can resolve this by putting a copy of the DLL in the application's executing directory. The workflow then executes correctly So it appears that IIS is trying to reload the assembly, even though its already in memory. Is there anyway to alter or disable this behavior in IIS? Perhaps a hook I can write that will intercept the request to load the dll and use my own logic to do so?

    Read the article

  • DAO, Spring and Hibernate

    - by EugeneP
    Correct me if anything is wrong. Now when we use Spring DAO for ORM templates, when we use @Transactional attribute, we do not have control over the transaction and/or session when the method is called externally, not within the method. Lazy loading saves resources - less queries to the db, less memory to keep all the collections fetched in the app memory. So, if lazy=false, then everything is fetched, all associated collections, that is not effectively, if there are 10,000 records in a linked set. Now, I have a method in a DAO class that is supposed to return me a User object. It has collections that represent linked tables of the database. I need to get a object by id and then query its collections. Hibernate "failed to lazily initialize a collection" exception occurs when I try to access the linked collection that this DAO method returns. Explain please, what is a workaround here?

    Read the article

  • GLTessellator crashing

    - by user146780
    I'v followed a tutorial to get the GLU tesselator working. It woulds except the interpolation for colors of new points causes a crash (error reading from memory...) This is my callback where it crashes: void CALLBACK combineCallback(GLdouble coords[3], GLdouble *vertex_data[4], GLfloat weight[4], GLdouble **dataOut) { GLdouble *vertex; int i; vertex = (GLdouble *) malloc(6 * sizeof(GLdouble)); vertex[0] = coords[0]; vertex[1] = coords[1]; vertex[2] = coords[2]; //crashes here **for (int i = 3; i < 6; i++) { vertex[i] = weight[0] * vertex_data[0][i] + weight[1] * vertex_data[1][i] + weight[2] * vertex_data[2][i] + weight[3] * vertex_data[3][i]; }** //crashes here *dataOut = vertex; } I looked at memory when it crashes but can't put my finger on exactly what triggers it. I followed this tutorial: http://www.flipcode.com/archives/Polygon_Tessellation_In_OpenGL.shtml Thanks

    Read the article

  • How does jQuery stores data with .data()?

    - by TK
    I am a little confused how jQuery stores data with .data() functions. Is this something called expando? Or is this using HTML5 Web Storage although I think this is very unlikely? The documentation says: The .data() method allows us to attach data of any type to DOM elements in a way that is safe from circular references and therefore from memory leaks. As I read about expando, it seems to have a rick of memory leak. Unfortunately my skills are not enough to read and understand jQuery code itself, but I want to know how jQuery stores such data by using data(). http://api.jquery.com/data/

    Read the article

  • Remove UIViewController from UIScrollView?

    - by tobi
    Hi, i add different View with (setPageID) to a ScrollView, but know i get a Memory problem on rotaion and i want to remove the actualy not showed view... how can i do this or how can i remove the memory problem? Thanks!!! - (void)setPageID:(int)page { if (page < 0) return; if (page >= self.listOfItems.count) return; CGFloat cx = 0; ScrollingViewStep *controller = [viewControllers objectAtIndex:page]; if ((NSNull *)controller == [NSNull null]) { controller = [[ScrollingViewStep alloc] init]; [viewControllers replaceObjectAtIndex:page withObject:controller]; [controller release]; } if (nil == controller.view.superview) { if([[UIDevice currentDevice] orientation] == UIDeviceOrientationPortrait || [[UIDevice currentDevice] orientation] == UIDeviceOrientationPortraitUpsideDown) { cx = 768.0 * page; controller.view.frame = CGRectMake(cx, 0.0 , 768.0f, 926.0f); } else { cx = 1024.0 * page; controller.view.frame = CGRectMake(cx, 0.0 , 1024.0f, 670.0f); } [controller setView:ItemID PageID:page Text:[[self.listOfItems objectAtIndex:page] objectForKey:@"step"]]; [scrollView addSubview:controller.view]; } } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { CGFloat cx2 = 0; for (int i = 0; i < [self.viewControllers count]; i++) { ScrollingViewStep *viewController = [self.viewControllers objectAtIndex:i]; if ((NSNull *)viewController != [NSNull null]) { if([[UIDevice currentDevice] orientation] == UIDeviceOrientationPortrait || [[UIDevice currentDevice] orientation] == UIDeviceOrientationPortraitUpsideDown) { cx2 = 768.0 * i; viewController.view.frame = CGRectMake(cx2, 0.0 , 768.0f, 926.0f); [viewController repos]; } else { cx2 = 1024.0 * i; viewController.view.frame = CGRectMake(cx2, 0.0 , 1024.0f, 670.0f); [viewController repos]; } } } if((interfaceOrientation == UIInterfaceOrientationPortrait) || (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown)) { CGRect frame = scrollView.frame; frame.origin.x = 768 * currentPageInScrollview; frame.origin.y = 0; [scrollView scrollRectToVisible:frame animated:NO]; } else { CGRect frame = scrollView.frame; frame.origin.x = 1024 * currentPageInScrollview; [scrollView scrollRectToVisible:frame animated:NO]; } pageControlIsChangingPage = YES; return YES; } - (void)didReceiveMemoryWarning { int currentPage = currentPageInScrollview; NSLog(@"MEMORY"); // unload the views+controllers which are no longer visible UIViewController *l; for (int i = 0; i < [self.viewControllers count]; i++) { ScrollingViewStep* viewController = [self.viewControllers objectAtIndex:i]; if((NSNull *)viewController != [NSNull null]) { if(i < currentPage-1 || i > currentPage+1) { [self.viewControllers replaceObjectAtIndex:i withObject:[NSNull null]]; } } } [super didReceiveMemoryWarning]; }

    Read the article

  • Inserting clobs into oracle with ODBC

    - by Carra
    I'm trying to insert a clob into Oracle. If I try this with an OdbcConnection it does not insert the data into the database. It returns 1 row affected and no errors but nothing is inserted into the database. It does work with an OracleConnection. However, using the Microsoft OracleClient makes our webservices often crash with an AccessViolationException (Attempted to read or write protected memory. This is often an indication that other memory is corrupt.). This happens a lot when we use OracleDataAdapter.Fill(dataset). So using this doesn't seem like an option. Is there any way to insert/update clobs with more then 4.000 characters from .Net with an OdbcConnection?

    Read the article

  • Practical non-Turing-complete languages?

    - by Kyle Cronin
    Nearly all programming languages used are Turing Complete, and while this affords the language to represent any computable algorithm, it also comes with its own set of problems. Seeing as all the algorithms I write are intended to halt, I would like to be able to represent them in a language that guarantees they will halt. Regular expressions used for matching strings and finite state machines are used when lexing, but I'm wondering if there's a more general, broadly language that's not Turing complete? edit: I should clarify, by 'general purpose' I don't necessarily want to be able to write all halting algorithms in the language (I don't think that such a language would exist) but I suspect that there are common threads in halting proofs that can be generalized to produce a language in which all algorithms are guaranteed to halt. There's also another way to tackle this problem - eliminate the need for theoretically infinite memory. Once you limit the amount of memory the machine is allowed, the number of states the machine is in is finite and countable, and therefore you can determine if the algorithm will halt (by not allowing the machine to move into a state it's been in before).

    Read the article

  • How to determine Windows.Diagnostics.Process from ServiceController

    - by Alex
    This is my first post, so let me start by saying HELLO! I am writing a windows service to monitor the running state of a number of other windows services on the same server. I'd like to extend the application to also print some of the memory statistics of the services, but I'm having trouble working out how to map from a particular ServiceController object to its associated Diagnostics.Process object, which I think I need to determine the memory state. I found out how to map from a ServiceController to the original image name, but a number of the services I am monitoring are started from the same image, so this won't be enough to determine the Process. Does anyone know how to get a Process object from a given ServiceController? Perhaps by determining the PID of a service? Or else does anyone have another workaround for this problem? Many thanks, Alex

    Read the article

  • Are there any free .NET OCR libraries that will perform OCR on an application window directly?

    - by Kelsey
    I am looking for a free .NET OCR library that will be able to do OCR on a given application window or even a image in memory (I can take a snapshot of the application window myself). I have looked at tessnet2 and MODI but both require an image located on disk. I need to use OCR because the application I am trying to write a script for does some wacky stuff that cannot be read using windows API and I need to scrape data from the screen. I have tested both of tessnet2 and MODI and they both can read the text mostly but because this has to run in an enviroment that will not be able to write to disk, I need it to be able to read directly from the applciation window or some type of memory stream. I am thinking OCR is my only soution but there could be other methods that I am not thinking of. Suggestions?

    Read the article

  • ActiveMQ 5.2.0 + REST + HTTP POST = java.lang.OutOfMemoryError

    - by Bruce Loth
    First off, I am a newbie when it comes to JMS & ActiveMQ. I have been looking into a messaging solution to serve as middleware for a message producer that will insert XML messages into a queue via HTTP POST. The producer is an existing system written in C++ that cannot be modified (so Java and the C++ API are out). Using the "demo" examples and some trial and error, I have cobbled together a working example of what I want to do (on a windows box). The web.xml I configured in a test directory under "webapps" specifies that the HTTP POST messages received from the producer are to be handled by the MessageServlet. I added a line for the text app in "activemq.xml" ('ow' is the test app dir): I created a test script to "insert" messages into the queue which works well. The problem I am running into is that it as I continue to insert messages via REST/HTTP POST, the memory consumption and thread count used by ActiveMQ continues to rise (It happens when I have timely consumers as well as slow or non-existent consumers). When memory consumption gets around 250MB's and the thread count exceeds 5000 (as shown in windows task manager), ActiveMQ crashes and I see this in the log: Exception in thread "ActiveMQ Transport Initiator: vm://localhost#3564" java.lang.OutOfMemoryError: unable to create new native thread It is as if Jetty is spawning a new thread to handle each HTTP POST and the thread never dies. I did look at this page: http://activemq.apache.org/javalangoutofmemory.html and tried but that didn't fix the problem (although I didn't fully understand the implications of the change either). Does anyone have any ideas? Thanks! Bruce Loth PS - I included the "test message producer" python script below for what it is worth. I created batches of 100 messages and continued to run the script manually from the command line while watching the memory consumption and thread count of ActiveMQ in task manager. def foo(): import httplib, urllib body = "<?xml version='1.0' encoding='UTF-8'?>\n \ <ROOT>\n \ [snip: xml deleted to save space] </ROOT>" headers = {"content-type": "text/xml", "content-length": str(len(body))} conn = httplib.HTTPConnection("127.0.0.1:8161") conn.request("POST", "/ow/message/RDRCP_Inbox?type=queue", body, headers) response = conn.getresponse() print response.status, response.reason data = response.read() conn.close() ## end method definition ## Begin test code count = 0; while(count < 100): # Test with batches of 100 msgs count += 1 foo()

    Read the article

< Previous Page | 207 208 209 210 211 212 213 214 215 216 217 218  | Next Page >