You are not logged in -
nap
CSDb User Forums
Forums
>
C64 Coding
>
c64 garbage collection, NEED HELP!!!
2013-07-27
22:18
stiggity
Account closed
Registered: Jul 2013
Posts: 5
c64 garbage collection, NEED HELP!!!
I came across a real nice "aftermarket" c64 garbage collection routine. I spent 2 hours on the source, and got it able to
compile in my assembler (64tass). but, all comments are in
German. Im writing a BBS program for the 64, and it runs and
works, but it will pause for 10/12/15 seconds here and there. And anyone not knowing its collecting garbage, may
drop carrier. I would like to intermingle this code, into my own project, but believe its a little above my skills level. If anyone is into c64 telecom, and thinks they could help me out, be my guest. I can describe, and explain how my memory is laid-out, with the BBS. So if you think your good, and believe this code _can_ be intermingled, I can fully credit you in docs, manual, website, and email support. Thanks. Id rather go back and forth via E-mail, rather than posting the source here. I'm safe! :)
-Thanks,
--Steve
stiggity99(@)Comcast.net
... 20 posts hidden. Click
here
to view all posts....
2014-02-05
12:30
Tao
Registered: Aug 2002
Posts: 115
Quote:
And I thought Tao modded C*Base is the best there is anyhow nowadays? :)
It is :P But I don't use a custom GC routine. I expect most BBS programs do the same thing as C*Base -- call the standard garbage collector from the wait screen.
2014-02-05
12:41
chatGPZ
Registered: Dec 2001
Posts: 11523
i actually remember driving to
moses
for hacking a fast garbage collection into c*base so it wouldnt be vulnerable to the good old wait-at-prompt-for-minutes problem :)
2014-02-05
12:51
JackAsser
Registered: Jun 2002
Posts: 2038
Found this floating around:
http://www.atarimagazines.com/compute/issue49/422_1_Garbage_Col..
2014-02-05
19:35
soci
Registered: Sep 2003
Posts: 486
As the article says this is a solved problem in later basic versions.
The solution was to put a "back" pointer right after the allocated string which points to the string length and pointer of the original variable/array element.
Deleted strings reuse this pointer for noting down the size of the deleted string by using a special pointer of $ffxx.
With this it's trivial to garbage collect in O(n) time.
Just start from the end of string area. Either there's a normal back pointer, this can be used to find out how big the string is and where to adjust it's pointer after the move.
Or it could be a special pointer ($ffxx) then it's a hole, skip it over, the length is the xx part.
Then continue compaction until the beginning of string area is reached.
This costs 2 extra bytes per string of course. And the amount of extra code which fixes/replaces the original string handling...
Previous
-
1
|
2
| 3 - Next
Refresh
Subscribe to this thread:
You need to be logged in to post in the forum.
Search the forum:
Search
All forums
C64 Coding
C64 Composing
C64 Pixeling
C64 Productions
CSDb Bug Reports
CSDb Development
CSDb Discussions
CSDb Entries
CSDb Feedback
CSDb Info
CSDb moderators
CSDb Questions
Messages to moderators
Requests
for
in
Writer & text
Text
Writer
All times are CET.
Search CSDb
All
Releases
Groups
Sceners
Events
BBS
SIDs
-------
Forum
Comments
Advanced
Users Online
Krill/Plush
REBEL 1/HF
Scooby/G★P/Light
Guests online: 167
Top Demos
1
Next Level
(9.7)
2
13:37
(9.7)
3
Codeboys & Endians
(9.7)
4
Mojo
(9.6)
5
Coma Light 13
(9.6)
6
Edge of Disgrace
(9.6)
7
Signal Carnival
(9.6)
8
Wonderland XIV
(9.5)
9
Uncensored
(9.5)
10
Comaland 100%
(9.5)
Top onefile Demos
1
Nine
(9.7)
2
Layers
(9.6)
3
Cubic Dream
(9.6)
4
Party Elk 2
(9.6)
5
Copper Booze
(9.5)
6
Scan and Spin
(9.5)
7
Onscreen 5k
(9.5)
8
Grey
(9.5)
9
Dawnfall V1.1
(9.5)
10
Rainbow Connection
(9.5)
Top Groups
1
Artline Designs
(9.3)
2
Booze Design
(9.3)
3
Oxyron
(9.3)
4
Performers
(9.3)
5
Censor Design
(9.3)
Top Diskmag Editors
1
Magic
(10)
2
Jazzcat
(9.5)
3
hedning
(9.2)
4
Elwix
(9.1)
5
Peter
(9.0)
Home
-
Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.172 sec.