Thread: Memory Check ?!?

  1. #1
    Registered User Moni's Avatar
    Join Date
    Oct 2002
    Location
    Dhaka, Bangladesh.
    Posts
    104

    Memory Check ?!?

    Hi there!

    It's a little intersting problem I think!

    I have an executable file.............say run.exe (In Win) or ./run (In Linux)................ I am not sure how much memory it gains while running..............is there any way to locate it?

    Few days ago..........I got a answer but that was little hard for me

    And another thing if I think that I won't allow more than 5MB of memory by malloc() or new...........then how can I protect it ???
    We all are the components of a huge program...... the programmer is always debugging us with His debugger.

  2. #2
    Registered User Moni's Avatar
    Join Date
    Oct 2002
    Location
    Dhaka, Bangladesh.
    Posts
    104
    A talented programmer mailed me....................

    to change the malloc.h header file and overload the new operator.
    Then they can't share memory more than I provide........but that is so difficult isn't it???

    Have you any other suggesion ???
    We all are the components of a huge program...... the programmer is always debugging us with His debugger.

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    What exactly are you trying to do?
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  4. #4
    Registered User Moni's Avatar
    Join Date
    Oct 2002
    Location
    Dhaka, Bangladesh.
    Posts
    104
    From another portion .......... I was with that problem then........now it's ok and I am working with the security

    For a portion of my project, I need to check whether there are files (of specific extension) exist in a folder.

    Let me explain it by example:

    There is a folder name: Prog
    I have to check every 10 seconds, is there any p01.cpp file or not?
    There may be multiple files..........

    p02.cpp
    p03.cpp
    p04.cpp

    And I have to get the name of all of the files that comes in that folder in every 10 seconds.

    And after that I have compile each of them and save the result like

    p02.txt
    p03.txt
    p04.txt

    etc.

    Then I'll remove the file from that folder so that it can't be in the list of compilations while those are already done

    It will be better if the code can be written in C++ the compiler I am using is Borland C++ 5.02 and the bcc for file compiling.

    I'll redirect the compilation result in that p02.txt...............
    We all are the components of a huge program...... the programmer is always debugging us with His debugger.

  5. #5
    Registered User Moni's Avatar
    Join Date
    Oct 2002
    Location
    Dhaka, Bangladesh.
    Posts
    104
    Oh, sorry I forgot to mention...........it's a online programming contest system.......like

    http://acm.uva.es

    It's my Univ. project
    We all are the components of a huge program...... the programmer is always debugging us with His debugger.

  6. #6
    Registered User Moni's Avatar
    Join Date
    Oct 2002
    Location
    Dhaka, Bangladesh.
    Posts
    104
    Hello............I really need help.............any good ans plz
    We all are the components of a huge program...... the programmer is always debugging us with His debugger.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Mutex and Shared Memory Segment Questions.
    By MadDog in forum Linux Programming
    Replies: 14
    Last Post: 06-20-2010, 04:04 AM
  2. Replies: 7
    Last Post: 02-06-2009, 12:27 PM
  3. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  4. Managing shared memory lookups
    By clancyPC in forum Linux Programming
    Replies: 0
    Last Post: 10-08-2003, 04:44 AM
  5. Is it necessary to write a specific memory manager ?
    By Morglum in forum Game Programming
    Replies: 18
    Last Post: 07-01-2002, 01:41 PM