Click Here
home features news forums classifieds faqs links search
5782 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
Home
Features
News
Forums
Classifieds
Links
Downloads
Extras
OS4 Zone
IRC Network
AmigaWorld Radio
Newsfeed
Top Members
Amiga Dealers
Information
About Us
FAQs
Advertise
Polls
Terms of Service
Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
15 crawler(s) on-line.
 4 guest(s) on-line.
 1 member(s) on-line.


 GaryG

You are an anonymous user.
Register Now!
 GaryG:  1 min ago
 BigD:  16 mins ago
 PhantomInterrogative:  25 mins ago
 ggw:  31 mins ago
 mistatwista3:  43 mins ago
 kipper2k:  53 mins ago
 The_Shadow:  1 hr 39 mins ago
 OlafS25:  1 hr 43 mins ago
 OneTimer1:  1 hr 47 mins ago
 Rob:  1 hr 56 mins ago

Software News   Software News : TLSFMem O(1) Memory Allocator V1.4
   posted by Anonymous on 28-Oct-2007 20:40:56 (8483 reads)
TLSFMem, the constant time memory allocator has been updated. The new version fixes several bugs and increases compatibility. It also comes with enhanced documentation and an FAQ.

Get it here: TLSFMem V1.4 (No longer available!)

Best regards

Chris Hodges
    

Related Links
· More about Software News



Most read story about Software News
UBoot 2010.06.04 for Sam460ex available

Last news about Software News
IBrowse 2.5 Released
Printer Friendly Page  Send this Story to a Friend

Goto page ( 1 | 2 )

PosterThread
Samwel 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 28-Oct-2007 21:11:25
#1 ]
Elite Member
Joined: 7-Apr-2004
Posts: 3396
From: Sweden

@platon42

Interesting.. How does this compare to the OS4 way of allocating?

Also why is this not incorporated into MorphOS instead of patched in?


_________________
/Harry

[SOLD] A1-C - 750GX 800MHz - 512MB - Antec Aria case

Avatar by HNL_DK!

 Status: Offline
Profile     Report this post  
RWO 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 28-Oct-2007 21:17:35
#2 ]
Regular Member
Joined: 8-Mar-2003
Posts: 457
From: Denmark

Very interesting read (the readme file)

Have you thourgth about adding it to AROS?

RWO


_________________
Debugging is a state of mind

 Status: Offline
Profile     Report this post  
DariusBrewka 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 28-Oct-2007 21:38:39
#3 ]
Member
Joined: 27-Jun-2005
Posts: 18
From: Germany

Quote:
Very interesting read (the readme file)


Oh it is, especialy the part:

Quote:

Q: Do you think that Philippe Bourdin (PAB) is an idiot and troll?
A: Yes. Apparently that won't change.


says something about the autor, but that's nothing good

Last edited by DariusBrewka on 28-Oct-2007 at 09:39 PM.

 Status: Offline
Profile     Report this post  
Anonymous 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 28-Oct-2007 22:27:36
# ]



Quote:
@platon42
Interesting.. How does this compare to the OS4 way of allocating?
Also why is this not incorporated into MorphOS instead of patched in?


I don't know about the OS4 allocator in detail, especially about its runtime complexity. But it has internal fragmentation of up to 12.5%.

Also, this is an Amiga Classic patch, not for MorphOS. What makes you think that MorphOS 2.0 won't get intrinsic TLSF?

 
     Report this post  
Samwel 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 28-Oct-2007 22:33:14
#5 ]
Elite Member
Joined: 7-Apr-2004
Posts: 3396
From: Sweden

@platon42

Ahh sorry I misunderstood.. I thought this was for MorphOS 1.4.x

Quote:

What makes you think that MorphOS 2.0 won't get intrinsic TLSF?


Nothing makes me think that.. I have NO idea whatsoever about MorphOS 2.0
and what features it has, other than the shown ones.


_________________
/Harry

[SOLD] A1-C - 750GX 800MHz - 512MB - Antec Aria case

Avatar by HNL_DK!

 Status: Offline
Profile     Report this post  
Samurai_Crow 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 29-Oct-2007 0:56:40
#6 ]
Elite Member
Joined: 18-Jan-2003
Posts: 2183
From: Ft. Collins, Colorado, USA

AFAIK OS4's slab allocator only gives constant time allocation for up to about 32k. Above that, it simply allocates pages from the MMU and allocates the remaining memory like the traditional AmigaOS does. The slab allocator's more of a piecemeal solution than this probably is.

 Status: Offline
Profile     Report this post  
EntilZha 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 29-Oct-2007 9:59:42
#7 ]
OS4 Core Developer
Joined: 27-Aug-2003
Posts: 1679
From: The Jedi Academy, Yavin 4

Quote:
Above that, it simply allocates pages from the MMU and allocates the remaining memory like the traditional AmigaOS does


No, it doesn't.

Quote:
The slab allocator's more of a piecemeal solution than this probably is


The slab allocator's main purpose is different. It's not a general memory allocator.


_________________
Thomas, the kernel guy

"I don't have a frigging clue. I'm norwegian" -- Ole-Egil

All opinions expressed are my own and do not necessarily represent those of Hyperion Entertainment

 Status: Offline
Profile     Report this post  
tonyw 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 29-Oct-2007 11:26:35
#8 ]
Elite Member
Joined: 8-Mar-2003
Posts: 3179
From: Sydney (of course)

What does "constant time" mean? Does it mean that the time required to allocate a memory chunk is independent of the size?


_________________
cheers
tony

Hyperion Support Forum: http://forum.hyperion-entertainment.biz/index.php

 Status: Offline
Profile     Report this post  
_PAB_ 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 29-Oct-2007 11:54:11
#9 ]
Regular Member
Joined: 20-Sep-2003
Posts: 189
From: Germany

I tried a lot of times to discuss like men with that guy but he is absolutely resistent to any arguments and believes I'm somehow suffering of a psychic disorder, which I found to be a bit ignorant...
At least he never had any objective arguments but nothing like defamation in personal emails and in public fora.

One of the reasons I gave up the effort of trying to help the MorphOS guys since a very long time now.

Edit:
Btw. last time when this news item appeared first time on AmigaNews.de I just asked, how his software works (by patching system functions) and if there is perhaps some overhead that should be mentioned because real cpu calculation time is not so abstract like o(1) - there are factors to be multiplied and constants to be added, depending on the overhead, so saying it's o(1) does not need to make sense for realworld applications.
FYI so you know, how I made it into his FAQ...

This is so childish and I am ashamed for my fellow countrymen...

Last edited by _PAB_ on 29-Oct-2007 at 11:59 AM.
Last edited by _PAB_ on 29-Oct-2007 at 11:54 AM.


_________________

 Status: Offline
Profile     Report this post  
Samwel 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 29-Oct-2007 14:18:15
#10 ]
Elite Member
Joined: 7-Apr-2004
Posts: 3396
From: Sweden

@tonyw

I think it's how real time OS's work.. Memory allocation times does not change over
time.. It will always take the same time from the first time you start your computer.

EDIT: Alot of times in those sentenses

Last edited by Samwel on 29-Oct-2007 at 02:19 PM.


_________________
/Harry

[SOLD] A1-C - 750GX 800MHz - 512MB - Antec Aria case

Avatar by HNL_DK!

 Status: Offline
Profile     Report this post  
Chain-Q 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 29-Oct-2007 21:05:30
#11 ]
Cult Member
Joined: 31-Jan-2005
Posts: 818
From: Budapest, Hungary

Quote:
Have you thourgth about adding it to AROS?

As the readme states, it's in 68k assembly. Kinda hard to simply "add" it to AROS, to run it on x86... On the other hand, anyone is free to reimplement it, following the original docs, mentioned in the readme. The thing is public. There's no secret magic inside.


_________________
MorphOS, classic Amiga, demoscene, and stuff
"When a bridge is not enough, build a Viaduct!"
"Strip the Amiga community of speculation and we can fit every forum on a 720k floppy" (by resle)

 Status: Offline
Profile     Report this post  
Chain-Q 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 29-Oct-2007 21:12:38
#12 ]
Cult Member
Joined: 31-Jan-2005
Posts: 818
From: Budapest, Hungary

@Samwel
Quote:
Ahh sorry I misunderstood.. I thought this was for MorphOS 1.4.x

For MorphOS, there's another TLSF implementation available, which was made totally independent from this patch, done by Marcik Kurek, called FAlloc, and it's available from here. His implementation is not a patch, but a simple .library, which applications can use to manage their own memory. It sits on the top of normal exec memory functions, and it's complettely safe. For most software, a simple relinking or recompiling is enough, to use it.


_________________
MorphOS, classic Amiga, demoscene, and stuff
"When a bridge is not enough, build a Viaduct!"
"Strip the Amiga community of speculation and we can fit every forum on a 720k floppy" (by resle)

 Status: Offline
Profile     Report this post  
itix 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 29-Oct-2007 22:42:03
#13 ]
Elite Member
Joined: 22-Dec-2004
Posts: 3398
From: Freedom world

Quote:

if there is perhaps some overhead that should be mentioned because real cpu calculation time is not so abstract like o(1) - there are factors to be multiplied and constants to be added, depending on the overhead, so saying it's o(1) does not need to make sense for realworld applications.


It does not matter what those factors are. With enough data O(1) algorithm is always faster than O(n) algorithm and likely their performance curves cross very early.


_________________
Amiga Developer
Amiga 500, Efika, Mac Mini and PowerBook

 Status: Offline
Profile     Report this post  
guruman 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 29-Oct-2007 23:23:19
#14 ]
Regular Member
Joined: 20-Jun-2007
Posts: 132
From: Padova, Italy

"Constant time" should mean just that. In this particular case time is
measured vs total number of allocations. I haven't written any OS, and
for sure not AmigaOS, but if memory serves me well, the allocations in
AmigaOS create a list of pointers (or something like that! :P ) that
needs to be "browsed" at every allocation. So, the more allocations
have happened during the working session, the more time an additional
allocation takes, following the O(n) asyntotic behaviour, where n is
the number of total allocations. The TLSF algorithm is O(1), so it
won't slow down as uptimes of the OS grows. Moreover it applies a
politic that guarantees less memory fragmentation.
As Chris (platon42) said there are a couple of tests (like running
FragIt in the background to artificially cause faster growth of
allocations and fragmentation) you can perform on classic Amigas to
benchmark this patch and the original Amiga allocator but it should be
faster than Exec as soon as the free memory chunks exceed 20 or less,
which, in practical cases, is pretty soon. And that part of the
documentation also answered _PAB_ doubts...

Kind regards,
Andrea

 Status: Offline
Profile     Report this post  
Samwel 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 30-Oct-2007 0:13:22
#15 ]
Elite Member
Joined: 7-Apr-2004
Posts: 3396
From: Sweden

@Chain-Q

Ah interesting.. So what improvements have been noticed for the applications
using this library? What's the down side with the library itself using exec compared
to a patch making all applications using this?
I know this way is alot more system friendly,


_________________
/Harry

[SOLD] A1-C - 750GX 800MHz - 512MB - Antec Aria case

Avatar by HNL_DK!

 Status: Offline
Profile     Report this post  
Anonymous 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 30-Oct-2007 6:32:50
# ]



@PAB:
"I just asked, how his software works"

This is pathetic. That's not how you deserved your place in the FAQ and you know it. There is a difference between "just asking" and attempts to disparage at any cost and against all reasoning and objectivity.

"One of the reasons I gave up the effort of trying to help the MorphOS guys since a very long time now."

You really believe that, don't you? How come you drag "MorphOS guys" into this suddenly? You're not as innocent as you want us to believe.

"I am ashamed for my fellow countrymen..."

LOL... What have you done for your country or other people in general?

 
     Report this post  
falemagn 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 30-Oct-2007 8:16:07
#17 ]
Super Member
Joined: 24-Nov-2003
Posts: 1126
From: Italy

@platon42

Just curious: given that the Real Time Linux portal lists you as the guy who ported their TLSF library to AmigaOS and given that their implementation is licensed under a dual GPL and LGPL license, have you made a special deal with them so that you'd not release the library under those licenses, or have you just done your work independently from them and they mistakely listed you on their page?


_________________
It is well enough that people of the nation do not understand our banking and monetary
system, for if they did, I believe there would be a revolution before tomorrow morning.

~~ Henry Ford

 Status: Offline
Profile     Report this post  
Chain-Q 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 30-Oct-2007 8:38:00
#18 ]
Cult Member
Joined: 31-Jan-2005
Posts: 818
From: Budapest, Hungary

@Samwel
Quote:
So what improvements have been noticed for the applications using this library?

More (actually a lot more) speed for applications putting memory management subsystem on a heavy load (typically any C++ applications), especially when the memory is already heavily fragmented, f.eg. after long uptimes (on Amiga that means a few hours, during typical use). As a simple example, latest beta of Sputnik (yes, the public one, IIRC) already uses this lib, to gain extra speed and reduce memory fragmentation.

Quote:
What's the down side with the library itself using exec compared to a patch making all applications using this?

The downside is, that only a single app will benefit, not the system as whole. The upside is similar: you can keep the Amiga-style memory allocation system intact, emulating all the quirks, required by some buggy apps, and you can give extra speed for newly released apps even on the older versions of the OS, available to the public, without having to patch deep into the system. Apart from these, it's really only a matter of taste. Both solution has it's own pros and cons.


_________________
MorphOS, classic Amiga, demoscene, and stuff
"When a bridge is not enough, build a Viaduct!"
"Strip the Amiga community of speculation and we can fit every forum on a 720k floppy" (by resle)

 Status: Offline
Profile     Report this post  
_PAB_ 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 30-Oct-2007 12:45:53
#19 ]
Regular Member
Joined: 20-Sep-2003
Posts: 189
From: Germany

@platon42:
How do you explain the fact that someone else asked *exactly* the same questions as I did and you did not accuse him to be an idiot and troll ?

> How come you drag "MorphOS guys" into this suddenly?

All people involved that I have dealt with showed the same antipathy against "the other side", without any objective arguments.
OS4 is bad because they wanted to believe that they are superior, PAB is a troll because you feel better calling me a troll.
That's it - fine for me - feel better now, if you like.


_________________

 Status: Offline
Profile     Report this post  
Zardoz 
Re: TLSFMem O(1) Memory Allocator V1.4
Posted on 30-Oct-2007 12:46:21
#20 ]
Team Member
Joined: 13-Mar-2003
Posts: 4261
From: Unknown

Quote:
Just curious: given that the Real Time Linux portal lists you as the guy who ported their TLSF library to AmigaOS and given that their implementation is licensed under a dual GPL and LGPL license, have you made a special deal with them so that you'd not release the library under those licenses, or have you just done your work independently from them and they mistakely listed you on their page?


This is not a library and it is hand-written 68k assembly so I seriously doubt it has anything to do with that.


_________________

 Status: Offline
Profile     Report this post  

Goto page ( 1 | 2 )

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle