Thread: Memory problem with Borland C 3.1

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,666
    In Win32, you no longer have to worry about the low-level detail of handling each byte being transferred to/from some piece of hardware.

    For instance, to access a COM port, you would begin with CreateFile and a filename like "\\\\.\\COM3"
    Then scroll down to Communications Resources and carry on reading and following links.

    > That's is why i don't wan to modify a lot the structure of my program.
    To be honest, I might think about starting again.
    If you're working with some old software, which has a history of being modified by many different people over a number of years, then it's going to look pretty horrible in places. It will contain all sorts of 'DOS-hacks' necessary to make it work on DOS (eg. interrupts, worrying about 64K limits etc), and may even contain large amounts of dead code. It may also implement some features which are no longer needed.

    Attempting a line-by-line translation of that to Win32 will retain much of that, and add another layer of confusion for future maintainers.

    But if you do rewrite it in Win32 from scratch, then it will be a nice clean implementation which would be a solid base for future development and enhancement. You keep the old program as it stands as a reference to work to.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  2. #2
    Registered User
    Join Date
    Nov 2007
    Posts
    8
    I found what was the problem...

    My fuction and all my part of cade was called by an interrupt fuction. And this was the problem, becouse in the old machine and especially with my old compiler is very dangerous to call a fuction (a big fuction like mine) with lots of memory allocated and with lots of matematics operation.. But was not easy to found that my code was called by an interrupt fuction!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with atl memory cleaning
    By Mariam1989 in forum Windows Programming
    Replies: 1
    Last Post: 11-11-2008, 12:35 PM
  2. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 07:54 AM
  3. Memory problem...?
    By Xzyx987X in forum Windows Programming
    Replies: 4
    Last Post: 06-30-2004, 05:02 PM
  4. 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
  5. Program abort due to memory problem
    By cazil in forum C++ Programming
    Replies: 5
    Last Post: 01-21-2002, 12:55 PM