delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/24/00:10:15

From: fredex AT fcshome DOT stoneham DOT ma DOT us
Message-Id: <199607240101.VAA02683@fcshome.stoneham.ma.us>
Subject: Re: Please help me
To: 079519 AT bud DOT cc DOT swin DOT edu DOT au (John Joseph Newbigin)
Date: Tue, 23 Jul 1996 21:01:57 -0400 (EDT)
Cc: djgpp AT delorie DOT com
In-Reply-To: <Pine.OSF.3.91.960723122226.6203A-100000@bud.cc.swin.edu.au> from "John Joseph Newbigin" at Jul 23, 96 12:26:25 pm

Thinking furiously, John Joseph Newbigin wrote:
> 
> Firstly, I wrote a program to see how much memory I could allocate by looping
> and allocating blocks of memory.  When I use large blocks like 1meg, everything
> seems to work fine but when I use smaller blocks, the program has a sigsev
> thingy and dies (under DOS and CWSDPMI, but not WIndows).  This is not realy a
> problem as it would be quite unlikly to reach this limit in a normal program.  I
> would be greatful if anyone could tell me what causes this and how to overcome it.

This is, so I'm told, a bug in CWSDPMI (or maybe it's a feature ;-), where
a large number of relatively small allocations causesit to run out of heap
and die an ungraceful death. Based on your description, it's a bug that
the DPMI provider in Windows does not share.

> My second problem is about gdb.  I thought I would find out what was causing the
> problems described above so I read up the FAQ and was soon debuging my program
> but when I tried to single step, I got a message that the program had not been
> started.  When I start the program, it runs till the end, or has an error.  Could
> someone tell me hot to start a program so that I can step through it?

You need to set a breakpoint near (or at) the beginning of your program
before you start it, then you 'run' the program which will halt at that
breakpoint, then you can single-step from there.

Fred
-- 
-------------------------------------------------------------------------------
 .----    Fred Smith    /                        Office: fred AT computrition DOT com 
( /__  ,__.   __   __ /  __   : /                                 508-663-2524 
 /    /  /   /__) /  /  /__) .+'           Home: fredex AT fcshome DOT stoneham DOT ma DOT us 
/    /  (__ (___ (__(_ (___ / :__                                 617-438-5471 
-------------------------------- Jude 1:24,25 ---------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019