Commit graph

36 commits

Author SHA1 Message Date
Bill Currie
7ead5a91f8 don't let gcc automaticly inline functions but make gcc inline bigger
functions when told to. also make gcc warn if it can't inline a function.

Explicitly inline several functions (including moving VectorNormalize to
mathlib.h so it /can/ be) resulting in a 5.5% speedup for spam2 (88 to 92
fps)
2003-08-11 06:05:07 +00:00
Bill Currie
eb099ae0d3 make qf gcc 3.3 clean 2003-04-17 00:01:48 +00:00
Bill Currie
761a7546dd re-arrange things so __attribute__ and __builtin_expect are properly
autoconfiscated so rcsid will continue to work with gcc 3.3
2003-01-15 15:31:36 +00:00
Bill Currie
71196fedf6 make gcc more anal about prototypes, string constants and function
visibility (ie, global functions must have a prototype)
2003-01-06 18:28:13 +00:00
Bill Currie
ca4b3acd6c big protototype cleanup. Now, except for a few cases, all non-static
prototypes are in headers files.
2002-11-05 19:12:51 +00:00
Ragnvald Maartmann-Moe IV
46456158e8 Whitespace. 2002-08-25 04:47:57 +00:00
Bill Currie
a7b5b56a2c implement Z_Realloc, PR_Zone_Realloc and pr_obj_realloc 2002-05-29 20:58:53 +00:00
Bill Currie
44dcf74627 strip the \n from all(?) of the Sys_Error calls (Sys_Error itself will be
adding \n).
2002-05-14 06:12:29 +00:00
Bill Currie
9bf575d081 several little tweaks that more than make up for the reversion of low-copy 2001-12-03 08:46:56 +00:00
Adam Olsen
82095df9cf - make Cache_Flush catch errors before Cache_Flush, and hopefully
print useful debugging info
2001-11-25 03:16:15 +00:00
Adam Olsen
b7cbc15508 - remove the unused DYNAMIC_SIZE define 2001-11-24 16:32:39 +00:00
Bill Currie
cc66577f1c fixes for building on alpha (linux) 2001-11-16 01:09:17 +00:00
Bill Currie
2d068c0745 massive windows.h and WIN32 cleanup. 2001-10-16 21:40:45 +00:00
Bill Currie
b1f4a778f9 the rcsid commit from hell }:> 2001-09-28 06:26:31 +00:00
Bill Currie
49a85718f8 total nukage of Con_*Printf calls from libs (except for video). Sys_*Printf
(Sys_DPrintf is new) is now used exclusively for all lib printing. Con_Init
sets the sys printf recirection to Con_Print (which has been revamped
appropriatly) and the server sets it to SV_Print (which was SV_Printf and
the new SV_Printf calls /it/). This should fix the rcon print redirection
issues.
2001-09-21 04:22:46 +00:00
Adam Olsen
9ab9764b7a - Change QA_alloc to use variable-arguments, allowing for a much more
extensible interface.
2001-09-05 18:23:38 +00:00
Adam Olsen
f1a016c8a5 - Refine the Cache_Get callback, to use a void * instead of a char *
- Switch alias models over to Cache_Get/Cache_Release
2001-08-31 12:22:45 +00:00
Adam Olsen
6cab8cf4e0 - change Cache_Get calls to Cache_TryGet (which I just added), so they
can tollerate failure.
- minor error message tweak (an emptry string is not NULL!)
2001-08-31 03:48:26 +00:00
Adam Olsen
e149094bd2 - rename Qalloc and friends to QA_alloc
- add a QA_strdup
- add Cache_{Add,Remove,Get,Release}, for the locking version of the
  cache
- Convert libs/audio/* over to locking cache functions
2001-08-30 11:37:50 +00:00
Adam Olsen
5aceb0435e - add a cache_print command
- rename flush to cache_flush
- split off freeing of cache into a seperate function, as well as
  making it aware of read locks.
2001-08-29 15:29:17 +00:00
Adam Olsen
4deed9245a - Add CACHE_WRITE_{,UN}LOCK macros, and calls to them in Cache_*. No
effect until other things are done.
- Make Qalloc treat no callback as a failed callback
- Add a Qstrdup
- Fix a memory leak in cl_slists.c
2001-08-29 09:14:18 +00:00
Adam Olsen
f423b8a8e0 Preliminary Qalloc implimentation. Not yet used. 2001-08-29 04:52:03 +00:00
Bill Currie
aa3442f8b0 rearange the % calc to avoid float (and an ICE in gcc 3) 2001-08-29 01:20:30 +00:00
Ragnvald Maartmann-Moe IV
dbae10f979 whitespace. grr. 2001-08-28 23:58:22 +00:00
Adam Olsen
ff0cffde48 - my proof-of-concept mmapped cache code, currently disabled via ifdef
- also added a cache_profile command, which sorts allocations into
  power-of-2 sizes, then prints out how many are of that size, the
  average amount they use, and the percent of total memory is used.
  Also prints out totally allocated size, number of allocations, and
  average per allocation.
2001-08-28 23:26:58 +00:00
Bill Currie
ff2b08b2fd make the Z_Malloc zone checking depend on developer 2001-08-28 06:15:58 +00:00
Bill Currie
13ecebd6a0 make Z_Malloc and friends more useful by allowing multiple zones 2001-08-28 05:21:30 +00:00
Bill Currie
2f9fd74a31 zone.c gets its name back 2001-08-28 04:24:40 +00:00
Ragnvald Maartmann-Moe IV
edcf092b05 Whitespace, dammit. Oh, and removal of several orphaned comments. Comments in front of functions suck. 2001-08-22 22:03:16 +00:00
Bill Currie
1c9e1b176f fear the mighty const correct patch 2001-07-15 07:04:17 +00:00
Zephaniah E. Hull
908d265212 Clean up and repair of the run time linking, does NOT work until deek
commits his gl_funcs.c.
2001-06-26 02:26:46 +00:00
Adam Olsen
853fbb4242 Change commented out Con_Printf statements in Cache_Move into
Con_DPrintf statements, so they can be used in debugging without
recompiling.  And no, there's no performance issue.
2001-04-17 08:39:44 +00:00
Bill Currie
f37b007da2 nuke the memset in Hunk_HighAllocName 2001-04-12 23:39:23 +00:00
Bill Currie
f78b973978 move the api headers into include/QF and clean up (most of) the resulting mess.
target specific files that I don't build won't compile yet. just put QF/
infront of the offending headers.

Also move ver_check into libqfutils
2001-03-27 20:33:07 +00:00
Ragnvald Maartmann-Moe IV
c6da49206e More typos, spelling corrections, and case fixes fed to the nearest handy fiend. 2001-02-22 00:15:03 +00:00
Bill Currie
95f6db7775 start merging stuff into libs/util and fix the concequences in nq. nq doesn't
build yet though (keys.c, *screen.c and *view.c) due to console fun.
2001-02-21 19:35:06 +00:00