createAtomic vs. createNonAtomic

Discussions related to Visual Prolog
Matthias Greving
Posts: 18
Joined: 21 Mar 2002 0:01

createAtomic vs. createNonAtomic

Unread post by Matthias Greving » 19 May 2009 14:49

Hello,

while converting an application into Prolog 7.2 I had to replace my binary::create statementes with createAtomic or createNonAtomic. That led to the question: is there a gideline or golden rule when to use Atomic and when to use NonAtomic space?

mfg
Matthias

User avatar
Thomas Linder Puls
VIP Member
Posts: 2447
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 19 May 2009 17:05

The rules are very simple:
  • If the binary does not contain any pointers it should be atomic
  • If the binary do contain one or more pointers it should be non-atiomic
I belive Carsten Kehler Holst made detailed descriptions of this and other memory issues in the VIP-ALC 2008 conference papers
Regards Thomas Linder Puls
PDC

Post Reply