| | |
| | | std::ostringstream outstr; |
| | | int key = 2; |
| | | |
| | | shmstring item; |
| | | std::string item; |
| | | |
| | | size_t qsize = 16; |
| | | //LockFreeQueue<struct Item> *queue = QueueFactory::createQueue<struct Item> (key, qsize); |
| | | SHMQueue<shmstring> *queue = new SHMQueue<shmstring>(key, 16); |
| | | SHMQueue<std::string> *queue = new SHMQueue<std::string>(key, 16); |
| | | // LockFreeQueue<struct Item> queue(16); |
| | | for(i = 0; i < qsize; i++) { |
| | | outstr.seekp(0); |
| | |
| | | // cout << "i=" << i << ":" << item << endl; |
| | | // } |
| | | |
| | | |
| | | shm_remove_queue(key); |
| | | |
| | | struct timespec timeout = {1, 0}; |
| | | |
| | |
| | | int main () { |
| | | mm_init(512); |
| | | // testArr(12); |
| | | testStruct(); |
| | | testString(); |
| | | |
| | | mm_destroy(); |
| | | return 0; |