1. not used warning from std/memory.e
- Posted by SDPringle Jul 09, 2009
- 930 views
I am perplexed by a 'not used' warning concerning the constant M_FREE in std/memory.e. M_FREE is declared and set on line 17 and is used on line 300. Why should I see this error?
Shawn Pringle
2. Re: not used warning from std/memory.e
- Posted by jimcbrown (admin) Jul 09, 2009
- 910 views
I am perplexed by a 'not used' warning concerning the constant M_FREE in std/memory.e. M_FREE is declared and set on line 17 and is used on line 300. Why should I see this error?
Shawn Pringle
For me the corresponding lines are 42 and 271 ...
3. Re: not used warning from std/memory.esv
- Posted by mattlewis (admin) Jul 09, 2009
- 903 views
I am perplexed by a 'not used' warning concerning the constant M_FREE in std/memory.e. M_FREE is declared and set on line 17 and is used on line 300. Why should I see this error?
Shawn Pringle
For me the corresponding lines are 42 and 271 ...
What version do you guys have? I'm at r2210, and I get:
$ grep -n M_FREE memory.e 45: M_FREE = 17 306: machine_proc(M_FREE, addr)
But, it's important to note how M_FREE is used:
ifdef not DATA_EXECUTE then machine_proc(M_FREE, addr) elsedef
So my guess is that Shawn is running code where DATA_EXECUTE is not defined. I have no idea what that is all about, but here, on Linux, I don't get a warning, so I assume that DATA_EXECUTE is not defined. I assume this has something to do with DEP and other memory protection stuff.
Matt
4. Re: not used warning from std/memory.e
- Posted by DerekParnell (admin) Jul 09, 2009
- 922 views
I am perplexed by a 'not used' warning concerning the constant M_FREE in std/memory.e. M_FREE is declared and set on line 17 and is used on line 300. Why should I see this error?
Shawn Pringle
Because its only used if DATA_EXECUTE is defined. However, which is the correct name "DATA_EXECUTE" or "EXECUTE_DATA" because you use both in the code.
The correct usage needs to be ...
constant M_ALLOC = 16 ifdef EXECUTE_DATA then constant M_FREE = 17 end ifdef
5. Re: not used warning from std/memory.e
- Posted by SDPringle Jul 09, 2009
- 878 views
Yes. Thank you. I have decided on DATA_EXECUTE because that is in the DEP acronym. It all makes sense now.
Shawn
6. Re: not used warning from std/memory.e
- Posted by SDPringle Jul 09, 2009
- 930 views
Please don't fix std/memory.e. I have this file open and if you do I'll get conflicted files on commit.
Shawn