Search Results

Search found 16731 results on 670 pages for 'memory limit'.

Page 129/670 | < Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >

  • Memory Allocation Error in MySQL

    - by Chinjoo
    I am using MySql ODBC driver with .Net 3.5. I have created a stored procedure in MySQl which accepts around 15 parameters with types like datetime, varchar, Int32, Int64 etc.. When I run the SP from the query window with the arguments provided, it runs fine. But whwn I test using the .Net application, it gives exception with "Memory allocation error", MySQL native error code is 4001. Any help will be much appreciated.

    Read the article

  • C# programmer - necessary to learn C or C++?

    - by Kurresmack
    Hey, I have been programming now for a couple of years. But never any low level language. I started off with some java and some VB. Then I went over to VB.NET and now for a while I have been writing C#. As you see, I have never written any low level language where I had to deal with memory management. Is this something I should do, like a route of passage that every programmer should go through? I am a bit keen on trying to perhaps writing in assembler directly. This would suit me personally good as I have 2 parents that have been writing assembler for ages. Is it necessary for a professional programmer these days to know how to manually manage memory?

    Read the article

  • Garbage Collection leak? Scripting Bridge leak?

    - by Y.Vera
    Hello everyone! I'm always really picky about memory leaks and I cannot understand why my garbage collected application leaks. My code is entirely memory-managed and it runs great without garbage collection, not a single leak. However, as soon as I turn on garbage collection it leaks! Just to prove a point, why does this leak in a garbage collected app? (place this dummy code at applicationDidFinishLaunching:) NSOpenPanel *panel = [NSOpenPanel openPanel]; [panel beginSheetModalForWindow:window completionHandler:^(NSInteger result) {NSBeep();}]; Also, is there a way to prevent leaks in apps (garbage collected or otherwise) that use Scripting Bridge? it seems as if they all leak, even the sample ones in xcode. Thanks everybody!

    Read the article

  • If I CFRelease() an image in core data, how do I get it back?

    - by Sam
    My iphone app plays a slide show made up of 5 user images.  These images are stored using core data.  I was noticing that memory was building up every time a different slide show was played and it was not releasing any of the previously played slide shows.   These images are showing up in Object Allocations as CFData. So I tried releasing this data in the dealloc method CFRelease(slideshow.image1); CFRelease(slideshow.image2); CFRelease(slideshow.image3); CFRelease(slideshow.image4); CFRelease(slideshow.image5); This releases the previous slideshow great...BUT when I go back to view that same slideshow again, it crashes.   I am guessing that I need to alloc/init these images again, but I am not sure how?  Or maybe I should be managing this memory in a different way?

    Read the article

  • Why isn't my Ruby object deleted when the last reference goes out of scope?

    - by Andrew Clegg
    Hi gurus, I've found a weird effect when trying to track down a memory leak in a Rails app. Can anyone explain what's going on here? Save this script as a plain Ruby script (Rails not necessary): class Fnord def to_s 'fnord' end end def test f = Fnord.new end test GC.start sleep 2 ObjectSpace.each_object do |o| puts o if o.is_a? Fnord end When I run this via ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux] I get the following: bash $ ruby var_test fnord Although the variable f is out of scope, there are no other references to the single Fnord object, and I've garbage collected, the object still seems to exist. Is this a nefarious memory leak of some sort, or am I completely missing something about Ruby? Further, if I change the test method to this: def test f = Fnord.new f = nil end I get no output. But surely this should not change the semantics here? Many thanks!

    Read the article

  • Invisible sprites still take up a lot in memory

    - by numerical25
    Just curious, if I have a sprite on the stage with the alpha set to 0 does that take up just as much memory as a sprite that is visible? I imagine it does because it draws the sprite to the stage and then it has to set the alpha to zero. It may seem like a stupid question but I just wanted to verify.

    Read the article

  • How to learn to program C the right way

    - by sfactor
    i have been programming in C/C++ for my academic courses a lot and was under the impression i had a pretty good grasp of it. but lately i had to work in a bluetooth application that had a server and client implementation in a Linux box and an embedded system. i learned bluez bluetooth API, socket/network programming and coded it. however i ran into a lot of problems with memory leaks and segmentation faults and other memory related errors along the way.as the code grew more complex i all but lost control of the pointers and threads and sockets. this got me wondering that i had a lot to learn that they didn't say in the basic C/C++ books. so i wanted to ask for the resources that are available that'll help be code better in a professional way in C/C++ .especially for the Linux/Mac environment (gcc compiler).

    Read the article

  • Memory release from local variable in javascript

    - by Bob
    Quick question. I have a js function which gets called on the page every few seconds. It's an ajax update thing. Being a function, I declare local variables. I don't want to use closures or global variables for various reasons. I'd never considered this, but do I need to release/clear the variables at the end of the function to release memory or will js do this for me automatically ? Thanks

    Read the article

  • FileSystemWatcher and System Out of Memory Exception

    - by Saurabh
    A little context There is a wpf based application which i left opened for 2-3 days without performing any activity throws out of memory exception , this is very Weird situation and does not happen all of the time. During this ideal activity , my application does nt perform any activity but just a file system watcher contineously watching a shared location , so i thought that would be a problem but i am not sure. Any suggestion is always welcomed.

    Read the article

  • Using Apache Velocity with StringBuilders/CharSequences

    - by mindas
    We are using Apache Velocity for dynamic templates. At the moment Velocity has following methods for evaluation/replacing: public static boolean evaluate(Context context, Writer writer, String logTag, Reader reader) public static boolean evaluate(Context context, Writer out, String logTag, String instring) We use these methods by providing StringWriter to write evaluation results. Our incoming data is coming in StringBuilder format so we use StringBuilder.toString and feed it as instring. The problem is that our templates are fairly large (can be megabytes, tens of Ms on rare cases), replacements occur very frequently and each replacement operation triples the amount of required memory (incoming data + StringBuilder.toString() which creates a new copy + outgoing data). I was wondering if there is a way to improve this. E.g. if I could find a way to provide a Reader and Writer on top of same StringBuilder instance that only uses extra memory for in/out differences, would that be a good approach? Has anybody done anything similar and could share any source for such a class? Or maybe there any better solutions to given problem?

    Read the article

  • vector related memory allocation question

    - by memC
    hi all, I am encountering the following bug. I have a class Foo . Instances of this class are stored in a std::vector vec of class B. in class Foo, I am creating an instance of class A by allocating memory using new and deleting that object in ~Foo(). the code compiles, but I get a crash at the runtime. If I disable delete my_a from desstructor of class Foo. The code runs fine (but there is going to be a memory leak). Could someone please explain what is going wrong here and suggest a fix? thank you! class A{ public: A(int val); ~A(){}; int val_a; }; A::A(int val){ val_a = val; }; class Foo { public: Foo(); ~Foo(); void createA(); A* my_a; }; Foo::Foo(){ createA(); }; void Foo::createA(){ my_a = new A(20); }; Foo::~Foo(){ delete my_a; }; class B { public: vector<Foo> vec; void createFoo(); B(){}; ~B(){}; }; void B::createFoo(){ vec.push_back(Foo()); }; int main(){ B b; int i =0; for (i = 0; i < 5; i ++){ std::cout<<"\n creating Foo"; b.createFoo(); std::cout<<"\n Foo created"; } std::cout<<"\nDone with Foo creation"; std::cout << "\nPress RETURN to continue..."; std::cin.get(); return 0; }

    Read the article

  • Win32 C/C++ Load Image from memory buffer

    - by Bruno
    I want to load a image (.bmp) file on a Win32 application, but I do not want to use the standard LoadBitmap/LoadImage from Windows API: I want it to load from a buffer that is already in memory. I can easily load a bitmap directly from file and print it on the screen, but this issue is making me stuck :( What I'm looking for is a function that works like this: HBITMAP LoadBitmapFromBuffer(char* buffer, int width, int height); Thanks.

    Read the article

  • Is use of LEAKS instrument still common on 3G iPhone?

    - by gordonmcdowell
    I'm working with an iPhone 3G, and when I'm trying to investigate memory leaks using the LEAKS instrument, my app crashes. It does not crash when LEAKS is not used. I'm making no claim to having a bug-free or non-memory-intensive app here. But I'd like to investigate leaks on an actual device. When I'm running LEAKS it is incredibly slow. Are there still developers working on iPhone 3G? I don't want to be the whiny guy blaming his tools, but I'd also like to be sure the whole dev world hasn't moved on to iPhone 3GS and I'm the only one trying to run both my app and leaks on a 3G. Currently running iOS 4.0 "gold". Snow Leopard dev env with latest XCode.

    Read the article

  • Creating huge images

    - by David Rutten
    My program has the feature to export a hi-res image of the working canvas to the disk. Users will frequently try to export images of about 20,000 x 10,000 pixels @ 32bpp which equals about 800MB. Add that to the serious memory consumption already going on in your average 3D CAD program and you'll pretty much guarantee an out-of-memory crash on 32-bit platforms. So now I'm exporting tiles of 1000x1000 pixels which the user has to stitch together afterwards in a pixel editor. Is there a way I can solve this problem without the user doing any work? I figured I could probably write a small exe that gets command-lined into the process and performs the stitching automatically. It would be a separate process and it would thus have 2GB of ram all to itself. Or is there a better way still? I'd like to support jpg, png and bmp so writing the image as a bytestream to the disk is not really possible.

    Read the article

  • The best alternative for String flyweight implementation in Java

    - by Dan
    My application is multithreaded with intensive String processing. We are experiencing excessive memory consumption and profiling has demonstrated that this is due to String data. I think that memory consumption would benefit greatly from using some kind of flyweight pattern implementation or even cache (I know for sure that Strings are often duplicated, although I don't have any hard data in that regard). I have looked at Java Constant Pool and String.intern, but it seems that it can provoke some PermGen problems. What would be the best alternative for implementing application-wide, multithreaded pool of Strings in java?

    Read the article

  • Why would I get a bus error or segmentation fault when calling free() normally?

    - by chucknelson
    I have a very simple test program, running on Solaris 5.8: #include <stdio.h> #include <stdlib.h> int main(void) { char *paths; paths = getenv("PATH"); printf("Paths: %s\n", paths); free(paths); // this causes a bus error return 0; } If I don't call free() at the end, it displays the message fine and exits. If I include the free() call, it crashes with a bus error. I've had other calls to free(), in other programs, cause segmentation faults as well. Even if I allocate the memory for *paths myself, free() will cause a bus error. Is there some reason trying to free up the memory is causing a crash?

    Read the article

  • C# programmer - necessary to learn C/C++?

    - by Kurresmack
    Hey, I have been programming now for a couple of years. But never any low level language. I started off with some java and some VB. Then I went over to VB.NET and now for a while I have been writing C#. As you see, I have never written any low level language where I had to deal with memory management. Is this something I should do, like a route of passage that every programmer should go through? I am a bit keen on trying to perhaps writing in assembler directly. This would suit me personally good as I have 2 parents that have been writing assembler for ages. Is it necessary for a professional programmer these days to know how to manually manage memory?

    Read the article

  • IOS SDK : first advices for beginners

    - by VdesmedT
    I too often answer the same kind of questions regarding basic topics like memory management, UITableView, Interface Orientation, MVC, etc... I understand very well that everyone starting with that SDK is too exited about getting its hand on it but a few reading would save them hours of debugging and the frustration that come along with the feeling that "We miss something here". I'd like experience users to share the few small articles, white papers, docs, book chapters that helps other save their time and avoid frustration. My first vote would be for : IOS Memory Management Guide View Controller Programming Guide Table View Guide And as a General recommendation, read the Overview section that come along with every class documention in the reference library, they contains most of what you need to know to avoid big traps !

    Read the article

  • Somewhat newb question about assy and the heap.

    - by Eric M
    Ultimately I am just trying to figure out how to dynamically allocate heap memory from within assembly. If I call Linux sbrk() from assembly code, can I use the address returned as I would use an address of a statically (ie in the .data section of my program listing) declared chunk of memory? I know Linux uses the hardware MMU if present, so I am not sure if what sbrk returns is a 'raw' pointer to real RAM, or is it a cooked pointer to RAM that may be modified by Linux's VM system? I read this: How are sbrk/brk implemented in Linux?. I suspect I can not use the return value from sbrk() without worry: the MMU fault on access-non-allocated-address must cause the VM to alter the real location in RAM being addressed. Thus assy, not linked against libc or what-have-you, would not know the address has changed. Does this make sense, or am I out to lunch?

    Read the article

< Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >