Hi,
Reading about the C++11, I stumbled upon this:
http://www2.research.att.com/~bs/C++0xFAQ.html#gc-abi
Specifically (quote):
int* p = new int;
p+=10;
// ... collector may run here ...
p-=10;
*p = 10;// can we be sure that the int is still th
06.07.2012 17:43, akaz пишет:
Hi,
Reading about the C++11, I stumbled upon this:
http://www2.research.att.com/~bs/C++0xFAQ.html#gc-abi
Specifically (quote):
int* p = new int;
p+=10;
// ... collector may run here ...
p-=10;
*p = 10;// can we be sure that the
If you are interested in D read this first:
http://dlang.org/garbage.html
You can find there e.g.:
> Do not add or subtract an offset to a pointer such that the
result points outside of the bounds of the garbage collected
object originally allocated.
So `p+=10;` is already "undefined behavior
On 06-07-2012 16:07, Denis Shelomovskij wrote:
06.07.2012 17:43, akaz пишет:
Hi,
Reading about the C++11, I stumbled upon this:
http://www2.research.att.com/~bs/C++0xFAQ.html#gc-abi
Specifically (quote):
int* p = new int;
p+=10;
// ... collector may run here ...
p-=10;
*p = 10; // can we be
On 07/06/2012 05:39 PM, Alex Rønne Petersen wrote:
On 06-07-2012 16:07, Denis Shelomovskij wrote:
06.07.2012 17:43, akaz пишет:
Hi,
Reading about the C++11, I stumbled upon this:
http://www2.research.att.com/~bs/C++0xFAQ.html#gc-abi
Specifically (quote):
int* p = new int;
p+=10;
// ... coll
On Friday, 6 July 2012 at 15:39:40 UTC, Alex Rønne Petersen
wrote:
On 06-07-2012 16:07, Denis Shelomovskij wrote:
06.07.2012 17:43, akaz пишет:
Hi,
Reading about the C++11, I stumbled upon this:
I'll just add: Handling this case is basically impossible to do
sanely. You can't really know w
On 06-07-2012 22:07, akaz wrote:
On Friday, 6 July 2012 at 15:39:40 UTC, Alex Rønne Petersen wrote:
On 06-07-2012 16:07, Denis Shelomovskij wrote:
06.07.2012 17:43, akaz пишет:
Hi,
Reading about the C++11, I stumbled upon this:
I'll just add: Handling this case is basically impossible to d
On 06/07/2012 16:39, Alex Rønne Petersen wrote:
On 06-07-2012 16:07, Denis Shelomovskij wrote:
06.07.2012 17:43, akaz пишет:
Hi,
Reading about the C++11, I stumbled upon this:
http://www2.research.att.com/~bs/C++0xFAQ.html#gc-abi
Specifically (quote):
int* p = new int;
p+=10;
// ... collect
On Friday, 6 July 2012 at 21:10:56 UTC, Simon wrote:
On 06/07/2012 16:39, Alex Rønne Petersen wrote:
On 06-07-2012 16:07, Denis Shelomovskij wrote:
06.07.2012 17:43, akaz пишет:
Never mind what D says, even in C/C++ just doing the p += 10 is
invalid.
Creating a pointer that points at inval
Won't some functions doing just what addRange() and
removeRange() do solve that kind of problem (if necessary)?
That means, forbidding the GC to scan some memory area for some
time?
Like their C++11 counterparts:
void declare_reachable(void* p); // the region of memory
starting at p
On 07-07-2012 05:02, akaz wrote:
On Friday, 6 July 2012 at 21:10:56 UTC, Simon wrote:
On 06/07/2012 16:39, Alex Rønne Petersen wrote:
On 06-07-2012 16:07, Denis Shelomovskij wrote:
06.07.2012 17:43, akaz пишет:
Never mind what D says, even in C/C++ just doing the p += 10 is invalid.
Creatin
On Saturday, 7 July 2012 at 03:02:07 UTC, akaz wrote:
On Friday, 6 July 2012 at 21:10:56 UTC, Simon wrote:
On 06/07/2012 16:39, Alex Rønne Petersen wrote:
Never mind what D says, even in C/C++ just doing the p += 10
is invalid.
Creating a pointer that points at invalid memory is just as
wron
12 matches
Mail list logo