You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Albert Strasheim (JIRA)" <ji...@apache.org> on 2007/05/29 22:40:33 UTC

[jira] Created: (AMQCPP-118) Provide a way to allocate and free with the same allocator

Provide a way to allocate and free with the same allocator
----------------------------------------------------------

                 Key: AMQCPP-118
                 URL: https://issues.apache.org/activemq/browse/AMQCPP-118
             Project: ActiveMQ C++ Client
          Issue Type: Improvement
            Reporter: Albert Strasheim
            Assignee: Nathan Mittler
             Fix For: 2.1


Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other platforms) where you can have code linked against more than one runtime in the same program. There should be a way to be sure that you allocate and deallocate AMQCPP objects using code linked against the same runtime (i.e. allocate and deallocate from the same heap).

More details in this thread:

[http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]

and here:

http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-118) Provide a way to allocate and free with the same allocator

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39189 ] 

Timothy Bish commented on AMQCPP-118:
-------------------------------------

We already use the beginthreadex and endthreadex for this reason.

> Provide a way to allocate and free with the same allocator
> ----------------------------------------------------------
>
>                 Key: AMQCPP-118
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-118
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>            Reporter: Albert Strasheim
>            Assignee: Nathan Mittler
>             Fix For: 2.1
>
>
> Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other platforms) where you can have code linked against more than one runtime in the same program. There should be a way to be sure that you allocate and deallocate AMQCPP objects using code linked against the same runtime (i.e. allocate and deallocate from the same heap).
> More details in this thread:
> [http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]
> and here:
> http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-118) Provide a way to allocate and free with the same allocator

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39192 ] 

Timothy Bish commented on AMQCPP-118:
-------------------------------------

I was wondering what other issues where going to show up, now we know  :)  It may be that we have to stipulate that in order to use the DLL you must ensure that you build it linked against the same Run-Time that your application is.  Its not an optimal solution but I know at my previous company we did just this for the same reasons.

Aren't DLL's fun  :)



> Provide a way to allocate and free with the same allocator
> ----------------------------------------------------------
>
>                 Key: AMQCPP-118
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-118
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>            Reporter: Albert Strasheim
>            Assignee: Nathan Mittler
>             Fix For: 2.1
>
>
> Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other platforms) where you can have code linked against more than one runtime in the same program. There should be a way to be sure that you allocate and deallocate AMQCPP objects using code linked against the same runtime (i.e. allocate and deallocate from the same heap).
> More details in this thread:
> [http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]
> and here:
> http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-118) Provide a way to allocate and free with the same allocator

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39184 ] 

Timothy Bish commented on AMQCPP-118:
-------------------------------------

Might be faster for you to try it locally, I won't be able to get to this till later in the week, not sure about Nate.

> Provide a way to allocate and free with the same allocator
> ----------------------------------------------------------
>
>                 Key: AMQCPP-118
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-118
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>            Reporter: Albert Strasheim
>            Assignee: Nathan Mittler
>             Fix For: 2.1
>
>
> Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other platforms) where you can have code linked against more than one runtime in the same program. There should be a way to be sure that you allocate and deallocate AMQCPP objects using code linked against the same runtime (i.e. allocate and deallocate from the same heap).
> More details in this thread:
> [http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]
> and here:
> http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-118) Provide a way to allocate and free with the same allocator

Posted by "Albert Strasheim (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39190 ] 

Albert Strasheim commented on AMQCPP-118:
-----------------------------------------

Actually looking at where this crashes turns up something interesting. The stack looks like this:

ntdll.dll!7c901230() 	
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]	
ntdll.dll!7c96c943() 	
ntdll.dll!7c96cd80() 	
ntdll.dll!7c960af8() 	
kernel32.dll!7c85e9cf() 	
vs2005-activemq-example.exe!_CrtIsValidHeapPointer(const void * pUserData=0x00c1af70)  Line 2072	C++
vs2005-activemq-example.exe!_free_dbg_nolock(void * pUserData=0x00c1af70, int nBlockUse=1)  Line 1279 + 0x9 bytes	C++
vs2005-activemq-example.exe!_free_dbg(void * pUserData=0x00c1af70, int nBlockUse=1)  Line 1220 + 0xd bytes	C++
vs2005-activemq-example.exe!operator delete(void * pUserData=0x00c1af70)  Line 54 + 0x10 bytes	C++
vs2005-activemq-example.exe!std::allocator<char>::deallocate(char * _Ptr=0x00c1af70, unsigned int __formal=32)  Line 141 + 0x9 bytes	C++
vs2005-activemq-example.exe!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Tidy(bool _Built=true, unsigned int _Newsize=0)  Line 2076	C++
vs2005-activemq-example.exe!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::~basic_string<char,std::char_traits<char>,std::allocator<char> >()  Line 906	C++
vs2005-activemq-example.exe!HelloWorldConsumer::onMessage(const cms::Message * message=0x00c1aa58)  Line 246	C++
activemq-cppd.dll!activemq::core::ActiveMQConsumer::dispatch(activemq::core::DispatchData & data={...})  Line 432	C++
activemq-cppd.dll!activemq::core::ActiveMQSessionExecutor::dispatch(activemq::core::DispatchData & data={...})  Line 189	C++
activemq-cppd.dll!activemq::core::ActiveMQSessionExecutor::dispatchAll()  Line 274	C++
activemq-cppd.dll!activemq::core::ActiveMQSessionExecutor::run()  Line 213	C++
activemq-cppd.dll!activemq::concurrent::Thread::runCallback(void * param=0x00c11ad8)  Line 152 + 0x13 bytes	C++
msvcr80d.dll!_callthreadstartex()  Line 348 + 0xf bytes	C
msvcr80d.dll!_threadstartex(void * ptd=0x00c13088)  Line 331	C
kernel32.dll!7c80b683() 	

The code that crashes is this:

{noformat}
if( textMessage != NULL ) {
    text = textMessage->getText();
} else {
    text = "NOT A TEXTMESSAGE!";
}
{noformat}

It crashes where the destructor for text is called, because it's trying to deallocate the string from the wrong heap. This doesn't make complete sense to me yet, but it doesn't look good for the mixing of runtimes.

> Provide a way to allocate and free with the same allocator
> ----------------------------------------------------------
>
>                 Key: AMQCPP-118
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-118
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>            Reporter: Albert Strasheim
>            Assignee: Nathan Mittler
>             Fix For: 2.1
>
>
> Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other platforms) where you can have code linked against more than one runtime in the same program. There should be a way to be sure that you allocate and deallocate AMQCPP objects using code linked against the same runtime (i.e. allocate and deallocate from the same heap).
> More details in this thread:
> [http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]
> and here:
> http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-118) Provide a way to allocate and free with the same allocator

Posted by "Albert Strasheim (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39188 ] 

Albert Strasheim commented on AMQCPP-118:
-----------------------------------------

As expected, linking the AMQCPP example program against the multithreaded static runtime and the AMQCPP DLL gives you the following error dialog when running the Debug build:

{noformat}
---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Assertion Failed!

Program: ...
File: dbgheap.c
Line: 1279

Expression: _CrtIsValidHeapPointer(pUserData)

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)
---------------------------
Abort   Retry   Ignore   
---------------------------
{noformat}

> Provide a way to allocate and free with the same allocator
> ----------------------------------------------------------
>
>                 Key: AMQCPP-118
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-118
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>            Reporter: Albert Strasheim
>            Assignee: Nathan Mittler
>             Fix For: 2.1
>
>
> Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other platforms) where you can have code linked against more than one runtime in the same program. There should be a way to be sure that you allocate and deallocate AMQCPP objects using code linked against the same runtime (i.e. allocate and deallocate from the same heap).
> More details in this thread:
> [http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]
> and here:
> http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-118) Provide a way to allocate and free with the same allocator

Posted by "Albert Strasheim (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39183 ] 

Albert Strasheim commented on AMQCPP-118:
-----------------------------------------

Timothy or Nathan, if you could get the code in place, I'll make an attempt to test it. I think that linking the AMQCPP example program against the AMQCPP DLL and against some other runtime like multi-threaded static (i.e. /MT[d] instead of /MD[d]) should cause a crash without these changes.

> Provide a way to allocate and free with the same allocator
> ----------------------------------------------------------
>
>                 Key: AMQCPP-118
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-118
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>            Reporter: Albert Strasheim
>            Assignee: Nathan Mittler
>             Fix For: 2.1
>
>
> Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other platforms) where you can have code linked against more than one runtime in the same program. There should be a way to be sure that you allocate and deallocate AMQCPP objects using code linked against the same runtime (i.e. allocate and deallocate from the same heap).
> More details in this thread:
> [http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]
> and here:
> http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-118) Provide a way to allocate and free with the same allocator

Posted by "Albert Strasheim (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39232 ] 

Albert Strasheim commented on AMQCPP-118:
-----------------------------------------

As far as I can tell, we can't do anything about this issue, so it can be resolved.

> Provide a way to allocate and free with the same allocator
> ----------------------------------------------------------
>
>                 Key: AMQCPP-118
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-118
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>            Reporter: Albert Strasheim
>            Assignee: Nathan Mittler
>             Fix For: 2.1
>
>
> Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other platforms) where you can have code linked against more than one runtime in the same program. There should be a way to be sure that you allocate and deallocate AMQCPP objects using code linked against the same runtime (i.e. allocate and deallocate from the same heap).
> More details in this thread:
> [http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]
> and here:
> http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-118) Provide a way to allocate and free with the same allocator

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39179 ] 

Timothy Bish commented on AMQCPP-118:
-------------------------------------

We should really think about how we do this as there are several classes that would require a method of destroying them if we go this route, some of which don't have an nice clean place where we can say the owner is...Session, Connection, etc

One idea I've been kicking around is to just overload the Ctor and Dtor for the classes that are exported from the CMS api, not sure this is the best thing but if it works than the usage would be transparent, which I'm a big fan of.  I really don't like the idea of having to make the users remember to not just use the standard delete and instead ho find a method in some other class that they can call to destroy an CMS object.  

Reading on overloading.
http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=40&rl=1

Another option would be to place static Destroy methods in each of the exported classes that take a pointer to the object to delete.

And there's probably a lot of other ways we should consider as well.


> Provide a way to allocate and free with the same allocator
> ----------------------------------------------------------
>
>                 Key: AMQCPP-118
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-118
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>            Reporter: Albert Strasheim
>            Assignee: Nathan Mittler
>             Fix For: 2.1
>
>
> Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other platforms) where you can have code linked against more than one runtime in the same program. There should be a way to be sure that you allocate and deallocate AMQCPP objects using code linked against the same runtime (i.e. allocate and deallocate from the same heap).
> More details in this thread:
> [http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]
> and here:
> http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-118) Provide a way to allocate and free with the same allocator

Posted by "Albert Strasheim (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39185 ] 

Albert Strasheim commented on AMQCPP-118:
-----------------------------------------

Okay, I'll take a look now. Watch this space.

> Provide a way to allocate and free with the same allocator
> ----------------------------------------------------------
>
>                 Key: AMQCPP-118
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-118
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>            Reporter: Albert Strasheim
>            Assignee: Nathan Mittler
>             Fix For: 2.1
>
>
> Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other platforms) where you can have code linked against more than one runtime in the same program. There should be a way to be sure that you allocate and deallocate AMQCPP objects using code linked against the same runtime (i.e. allocate and deallocate from the same heap).
> More details in this thread:
> [http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]
> and here:
> http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-118) Provide a way to allocate and free with the same allocator

Posted by "Albert Strasheim (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39180 ] 

Albert Strasheim commented on AMQCPP-118:
-----------------------------------------

I quite like the idea of overriding new and delete. It nicely hides the fact that this is an implementation-specific issue, instead of adding more functions to the CMS API.

> Provide a way to allocate and free with the same allocator
> ----------------------------------------------------------
>
>                 Key: AMQCPP-118
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-118
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>            Reporter: Albert Strasheim
>            Assignee: Nathan Mittler
>             Fix For: 2.1
>
>
> Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other platforms) where you can have code linked against more than one runtime in the same program. There should be a way to be sure that you allocate and deallocate AMQCPP objects using code linked against the same runtime (i.e. allocate and deallocate from the same heap).
> More details in this thread:
> [http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]
> and here:
> http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-118) Provide a way to allocate and free with the same allocator

Posted by "Albert Strasheim (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39191 ] 

Albert Strasheim commented on AMQCPP-118:
-----------------------------------------

More on this issue:

[http://msdn2.microsoft.com/en-us/library/ms235460(VS.80).aspx]

Somehow, I don't think we can fix this by simply changing our code, because things like std::string are still going to malfunction.


> Provide a way to allocate and free with the same allocator
> ----------------------------------------------------------
>
>                 Key: AMQCPP-118
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-118
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>            Reporter: Albert Strasheim
>            Assignee: Nathan Mittler
>             Fix For: 2.1
>
>
> Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other platforms) where you can have code linked against more than one runtime in the same program. There should be a way to be sure that you allocate and deallocate AMQCPP objects using code linked against the same runtime (i.e. allocate and deallocate from the same heap).
> More details in this thread:
> [http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]
> and here:
> http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQCPP-118) Provide a way to allocate and free with the same allocator

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQCPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQCPP-118.
---------------------------------

    Resolution: Fixed

Will not fix.

> Provide a way to allocate and free with the same allocator
> ----------------------------------------------------------
>
>                 Key: AMQCPP-118
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-118
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>            Reporter: Albert Strasheim
>            Assignee: Nathan Mittler
>             Fix For: 2.1
>
>
> Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other platforms) where you can have code linked against more than one runtime in the same program. There should be a way to be sure that you allocate and deallocate AMQCPP objects using code linked against the same runtime (i.e. allocate and deallocate from the same heap).
> More details in this thread:
> [http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]
> and here:
> http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-118) Provide a way to allocate and free with the same allocator

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39182 ] 

Timothy Bish commented on AMQCPP-118:
-------------------------------------

They're not quirks, they're features  :)  

We should definitely experiment to ensure it works as you'd expect.

> Provide a way to allocate and free with the same allocator
> ----------------------------------------------------------
>
>                 Key: AMQCPP-118
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-118
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>            Reporter: Albert Strasheim
>            Assignee: Nathan Mittler
>             Fix For: 2.1
>
>
> Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other platforms) where you can have code linked against more than one runtime in the same program. There should be a way to be sure that you allocate and deallocate AMQCPP objects using code linked against the same runtime (i.e. allocate and deallocate from the same heap).
> More details in this thread:
> [http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]
> and here:
> http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-118) Provide a way to allocate and free with the same allocator

Posted by "Nathan Mittler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39181 ] 

Nathan Mittler commented on AMQCPP-118:
---------------------------------------

Agreed!  So long as it doesn't add any other quirks for users, sounds like a much cleaner solution.

> Provide a way to allocate and free with the same allocator
> ----------------------------------------------------------
>
>                 Key: AMQCPP-118
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-118
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>            Reporter: Albert Strasheim
>            Assignee: Nathan Mittler
>             Fix For: 2.1
>
>
> Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other platforms) where you can have code linked against more than one runtime in the same program. There should be a way to be sure that you allocate and deallocate AMQCPP objects using code linked against the same runtime (i.e. allocate and deallocate from the same heap).
> More details in this thread:
> [http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]
> and here:
> http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-118) Provide a way to allocate and free with the same allocator

Posted by "Albert Strasheim (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39187 ] 

Albert Strasheim commented on AMQCPP-118:
-----------------------------------------

Another blog entry on creating threads that might be pertinent to this issue:

http://jundublog.blogspot.com/2006/06/on-windows-why-should-i-use.html

> Provide a way to allocate and free with the same allocator
> ----------------------------------------------------------
>
>                 Key: AMQCPP-118
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-118
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>            Reporter: Albert Strasheim
>            Assignee: Nathan Mittler
>             Fix For: 2.1
>
>
> Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other platforms) where you can have code linked against more than one runtime in the same program. There should be a way to be sure that you allocate and deallocate AMQCPP objects using code linked against the same runtime (i.e. allocate and deallocate from the same heap).
> More details in this thread:
> [http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]
> and here:
> http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-118) Provide a way to allocate and free with the same allocator

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39231 ] 

Timothy Bish commented on AMQCPP-118:
-------------------------------------

So have we reached a conclusion on this one? 

> Provide a way to allocate and free with the same allocator
> ----------------------------------------------------------
>
>                 Key: AMQCPP-118
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-118
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>            Reporter: Albert Strasheim
>            Assignee: Nathan Mittler
>             Fix For: 2.1
>
>
> Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other platforms) where you can have code linked against more than one runtime in the same program. There should be a way to be sure that you allocate and deallocate AMQCPP objects using code linked against the same runtime (i.e. allocate and deallocate from the same heap).
> More details in this thread:
> [http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]
> and here:
> http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-118) Provide a way to allocate and free with the same allocator

Posted by "Nathan Mittler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39193 ] 

Nathan Mittler commented on AMQCPP-118:
---------------------------------------

If that's the case, then let's just say that we don't support a mish-mash of runtimes.  Seems to be fair, especially given the fact that we don't release binaries - just source code.  They have to build it themselves anyway, so they should build the dll with the same environment as their applications.

> Provide a way to allocate and free with the same allocator
> ----------------------------------------------------------
>
>                 Key: AMQCPP-118
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-118
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>            Reporter: Albert Strasheim
>            Assignee: Nathan Mittler
>             Fix For: 2.1
>
>
> Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other platforms) where you can have code linked against more than one runtime in the same program. There should be a way to be sure that you allocate and deallocate AMQCPP objects using code linked against the same runtime (i.e. allocate and deallocate from the same heap).
> More details in this thread:
> [http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]
> and here:
> http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.