Re: basic example shared memory code

2011-11-23 Thread Oğuzhan TOPGÜL
When i delete exit(1), nothing has changed but when i commented out all the mutexes it works, counter is working well. That's great. :) that means shared memory is working well. in terms of mutexes i need to create mutex in post config in handler 1. lock mutex 2. process global variable 3. unlcok

Re: basic example shared memory code

2011-11-22 Thread MATSUMOTO Ryosuke
mod_vlimit https://modules.apache.org/search.php?id=2570 This module count a number of simultaneous connections on shared memory. 2011/11/22 michaelr my...@freenet.de: On Tue, 2011-11-22 at 11:26 +0200, Oğuzhan TOPGÜL wrote: Hi guys, I'm trying to learn shared memory and mutex concepts and i

Re: basic example shared memory code

2011-11-22 Thread Nick Kew
On 22 Nov 2011, at 09:26, Oğuzhan TOPGÜL wrote: Hi guys, I'm trying to learn shared memory and mutex concepts and i need an example shared memory apache module code that was written in c. If you're planning to write a module, bear in mind that apache now provides easy-to-use higher-level

Re: basic example shared memory code

2011-11-22 Thread Nick Kew
On Tue, 22 Nov 2011 09:41:02 -0500 Pranesh Vadhirajan vadhira...@teralogics.com wrote: Nick, can you suggest some of these higher-level abstractions, please? I have been trying to make a module of mine work with a POSIX shared memory implementation, but I'm going nowhere with that. Are you

Re: basic example shared memory code

2011-11-22 Thread Oğuzhan TOPGÜL
hey guys, i'm in terrible with these shared memory. I tried to write a basic module by looking at the examples that basic module just holds a counter and prints it to the client. when i compile the code attached, i got no error messages. But in apache error.log file i got lots of [notice] child

Re: basic example shared memory code

2011-11-22 Thread michaelr
On Tue, 2011-11-22 at 11:26 +0200, Oğuzhan TOPGÜL wrote: Hi guys, I'm trying to learn shared memory and mutex concepts and i need an example shared memory apache module code that was written in c. I found some codes, but none of them is working properly. I'm using ubuntu 10.10 as a development

RE: basic example shared memory code

2011-11-22 Thread Pranesh Vadhirajan
? Either way, if you could suggest what I should look into, it would be greatly appreciated. Thanks, Pranesh -Original Message- From: Nick Kew [mailto:n...@apache.org] Sent: Tuesday, November 22, 2011 7:44 AM To: modules-...@httpd.apache.org Subject: Re: basic example shared memory code

Re: basic example shared memory code

2011-11-22 Thread Oğuzhan TOPGÜL
Thank you guys so much. What i want to do with shared memory is to hold the requester IPs and a counter that holds how many times an IP made request. I'm planning to hold them in a binary tree. I thought holding these IPs and counters in a file is slower than holding them in a shared memory

Re: basic example shared memory code

2011-11-22 Thread Sorin Manolache
On Tue, Nov 22, 2011 at 21:25, Oğuzhan TOPGÜL oguzhantop...@gmail.com wrote: hey guys, i'm in terrible with these shared memory. I tried to write a basic module by looking at the examples that basic module just holds a counter and prints it to the client. when i compile the code attached, i