<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Gem #24: Null Considered Harmful (Part 2 &#8212; Efficiency)</title>
	<atom:link href="http://www.adacore.com/2008/01/28/ada-gem-24/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.adacore.com/2008/01/28/ada-gem-24/</link>
	<description>AdaCore technology and news</description>
	<lastBuildDate>Mon, 06 Feb 2012 18:59:19 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jean Francois Martinez</title>
		<link>http://www.adacore.com/2008/01/28/ada-gem-24/comment-page-1/#comment-910</link>
		<dc:creator>Jean Francois Martinez</dc:creator>
		<pubDate>Wed, 06 Feb 2008 04:30:59 +0000</pubDate>
		<guid isPermaLink="false">http://www2.adacore.com/2008/01/28/ada-gem-24/#comment-910</guid>
		<description>I am not sure that pointers not marked as not null are less efficient.  At least in systems who use virtual memory.  In these the operating system lets page zero unmapped and sends a signal to any process who is trying to access it (eg when a pointer is null).  So the compiler can simply rely on the hardware and the OS for catching dereferencing of null pointers.  (I don&#039;t know if that is what Ada does)

On the other hand if you mark the pointer as not null it means that you want the error being caught at affectation time instead of at dereference time so the compiler is forced to insert checks every time pointer is affecter a new value. 

PS: replace pointers by access types.</description>
		<content:encoded><![CDATA[<p>I am not sure that pointers not marked as not null are less efficient.  At least in systems who use virtual memory.  In these the operating system lets page zero unmapped and sends a signal to any process who is trying to access it (eg when a pointer is null).  So the compiler can simply rely on the hardware and the OS for catching dereferencing of null pointers.  (I don&#8217;t know if that is what Ada does)</p>
<p>On the other hand if you mark the pointer as not null it means that you want the error being caught at affectation time instead of at dereference time so the compiler is forced to insert checks every time pointer is affecter a new value. </p>
<p>PS: replace pointers by access types.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

