Home » U++ Library support » U++ Core » Problems with UPP_HEAP in multi-threaded
Problems with UPP_HEAP in multi-threaded [message #16367] |
Tue, 10 June 2008 21:49 |
cocob
Messages: 156 Registered: January 2008
|
Experienced Member |
|
|
Hello all
One more time, sorry for my english low skill, ...
I have some problems with UPP Core package in multi-threaded.
I have a package which use STL (strings, vectors, ...) Its functions works perfectly in an app with a single thread but in multithreaded i get a crash "Invalid memory access". It seems to come from overloaded function for HEAP (new, delete) which are use in STL for example in std::string::append().
Here a little example producing my problems.
My config : Debian lenny x86 UPP SVN r284
#include <Core/Core.h>
#include <iostream>
using namespace Upp;
class test
{
public:
typedef test CLASSNAME;
void loop();
void start();
};
void test::start()
{
Thread().Start(THISBACK(loop));
}
void test::loop()
{
std::string str;
while(true)
{
Thread().Sleep(200);
str.append("test");
std::cout << "loop" << std::endl;
}
}
CONSOLE_APP_MAIN
{
(new test)->start();
while(true)
{
Thread().Sleep(500);
std::cout << "Wait..." << std::endl;
}
}
|
|
|
|
|
Problems with UPP_HEAP in multi-threaded
By: cocob on Tue, 10 June 2008 21:49
|
|
|
Re: Problems with UPP_HEAP in multi-threaded
By: cocob on Tue, 10 June 2008 22:08
|
|
|
Re: Problems with UPP_HEAP in multi-threaded
By: mirek on Tue, 10 June 2008 23:44
|
|
|
Re: Problems with UPP_HEAP in multi-threaded
By: cocob on Wed, 11 June 2008 08:49
|
|
|
Re: Problems with UPP_HEAP in multi-threaded
By: mirek on Wed, 11 June 2008 09:12
|
|
|
Re: Problems with UPP_HEAP in multi-threaded
By: cocob on Wed, 11 June 2008 09:54
|
|
|
Re: Problems with UPP_HEAP in multi-threaded
By: mirek on Wed, 11 June 2008 10:45
|
|
|
Re: Problems with UPP_HEAP in multi-threaded
By: cocob on Wed, 11 June 2008 12:54
|
|
|
Re: Problems with UPP_HEAP in multi-threaded
By: cocob on Wed, 11 June 2008 13:19
|
|
|
Re: Problems with UPP_HEAP in multi-threaded
By: captainc on Thu, 07 August 2008 02:51
|
|
|
Re: Problems with UPP_HEAP in multi-threaded
By: cocob on Thu, 07 August 2008 08:42
|
|
|
Re: Problems with UPP_HEAP in multi-threaded
By: captainc on Fri, 08 August 2008 04:30
|
|
|
Re: Problems with UPP_HEAP in multi-threaded
By: mirek on Fri, 08 August 2008 08:31
|
|
|
Re: Problems with UPP_HEAP in multi-threaded
By: mirek on Fri, 08 August 2008 08:41
|
Goto Forum:
Current Time: Sat Apr 27 14:19:50 CEST 2024
Total time taken to generate the page: 0.03205 seconds
|