Mail Archives: djgpp/1997/08/04/15:15:12

Message-Id: <>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT edu DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT edu DOT ar>
Organization: INTI
To: Georg DOT Kolling AT t-online DOT de (Georg Kolling)
Date: Mon, 4 Aug 1997 16:33:27 +0000
MIME-Version: 1.0
Subject: Re: unused registers, realloc
CC: djgpp AT delorie DOT com

Georg DOT Kolling AT t-online DOT de (Georg Kolling) wrote

> 1. How can i prevent GCC from using a certain segment register? 
>    Or doesnt it use all segment registers? (Well, cs for code, ds for data,
>    ss for stack, fs for _far stuff... es and gs seem to be unused!)
GCC itself doen't use much, just cs,ds and ss. But libc will use es a lot for 
strings. FS is used only by code using sys/farptr.h (no libc). And GS if I 
remmember well is used in libc (look in the FAQ).

>    I need this for *fast* graphics, and reloading a segment (selector) isn't
>    very fast if i need to do this for every putpix!
Use the farptr thing and load FS 1 time by frame (or just one time in the 

> 2. Does realloc always return the same pointer if i try to shrink a previously
>    allocated chunk of memory?
Take a look to the source ;-).

------------------------------------ 0 --------------------------------
Visit my home page:
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -

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