win32-mmap 0.2.4 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,9 +1,10 @@
1
+ == 0.3.0 - 10-Apr-2013
2
+ * Converted code to use FFI.
3
+
1
4
  == 0.2.4 - 28-Apr-2010
2
5
  * The Rakefile was refactored. It now handles gem creation, building and
3
6
  cleanup.
4
7
  * Inline code was removed from the gemspec.
5
- * Removed the doc directory from the repository. The information that was
6
- there is already covered in the README.
7
8
 
8
9
  == 0.2.3 - 12-Aug-2009
9
10
  * Changed license to Artistic 2.0.
data/README CHANGED
@@ -1,65 +1,64 @@
1
1
  = Description
2
- This package provides a Ruby interface for memory mapped I/O on MS Windows.
2
+ This package provides a Ruby interface for memory mapped I/O on MS Windows.
3
3
 
4
4
  = Prerequisites
5
- Ruby 1.8.2 or later.
6
- windows-pr, 0.5.5 or later.
5
+ windows-pr, 0.5.5 or later.
7
6
 
8
7
  = Installation
9
- gem install win32-mmap
8
+ gem install win32-mmap
10
9
 
11
10
  = Synopsis
12
- require 'win32/mmap'
13
- include Win32
11
+ require 'win32/mmap'
12
+ include Win32
14
13
 
15
- map1 = MMap.new(:file => "C:\\test.map", :size => 1024)
16
- map1.foo = 'hello'
17
- map1.bar = 77
18
- map1.close
14
+ map1 = MMap.new(:file => "C:\\test.map", :size => 1024)
15
+ map1.foo = 'hello'
16
+ map1.bar = 77
17
+ map1.close
19
18
 
20
- map2 = MMap.new(:file => "C:\\test.map")
21
- p map2.foo # 'hello'
22
- p map2.bar # 77
23
- map2.close
19
+ map2 = MMap.new(:file => "C:\\test.map")
20
+ p map2.foo # 'hello'
21
+ p map2.bar # 77
22
+ map2.close
24
23
 
25
24
  = About Memory Mapped Files under Windows
26
- Under Windows, code and data are both repesented by pages of memory backed
27
- by files on disk, code by executable image and data by system pagefile
28
- (i.e. swapfile). These are called memory mapped files. Memory mapped files
29
- can be used to provide a mechanism for shared memory between processes.
30
- Different processes are able to share data backed by the same swapfile,
31
- whether it's the system pagefile or a user-defined swapfile.
25
+ Under Windows, code and data are both repesented by pages of memory backed
26
+ by files on disk, code by executable image and data by system pagefile
27
+ (i.e. swapfile). These are called memory mapped files. Memory mapped files
28
+ can be used to provide a mechanism for shared memory between processes.
29
+ Different processes are able to share data backed by the same swapfile,
30
+ whether it's the system pagefile or a user-defined swapfile.
32
31
 
33
- Windows has a tight security system that prevents processes from directly
34
- sharing information among each other, but mapped memory files provide a
35
- mechanism that works with the Windows security system by using a name that
36
- all processes use to open the swapfile.
32
+ Windows has a tight security system that prevents processes from directly
33
+ sharing information among each other, but mapped memory files provide a
34
+ mechanism that works with the Windows security system by using a name that
35
+ all processes use to open the swapfile.
37
36
 
38
- A shared section of the swapfile is translated into pages of memory that are
39
- addressable by more than one process, Windows uses a system resource called a
40
- prototype page table entry (PPTE) to enable more than one process to address
41
- the same physical page of memory, thus multiple process can share the same
42
- data without violating the Windows system security.
37
+ A shared section of the swapfile is translated into pages of memory that are
38
+ addressable by more than one process, Windows uses a system resource called a
39
+ prototype page table entry (PPTE) to enable more than one process to address
40
+ the same physical page of memory, thus multiple process can share the same
41
+ data without violating the Windows system security.
43
42
 
44
- In short, memory mapped files provide shared memory under Windows.
43
+ In short, memory mapped files provide shared memory under Windows.
45
44
 
46
- (This explanation was largely borrowed from Roger Lee's Win32::MMF Perl
47
- module.)
45
+ (This explanation was largely borrowed from Roger Lee's Win32::MMF Perl
46
+ module.)
48
47
 
49
48
  = Future Plans
50
- Suggestions welcome.
49
+ Suggestions welcome.
51
50
 
52
51
  = License
53
- Artistic 2.0
52
+ Artistic 2.0
54
53
 
55
54
  = Copyright
56
- (C) 2003-2010 Daniel J. Berger, All Rights Reserved
55
+ (C) 2003-2013 Daniel J. Berger, All Rights Reserved
57
56
 
58
57
  = Warranty
59
- This package is provided "as is" and without any express or
60
- implied warranties, including, without limitation, the implied
61
- warranties of merchantability and fitness for a particular purpose.
58
+ This package is provided "as is" and without any express or
59
+ implied warranties, including, without limitation, the implied
60
+ warranties of merchantability and fitness for a particular purpose.
62
61
 
63
62
  = Authors
64
- Daniel J. Berger
65
- Park Heesob
63
+ Daniel J. Berger
64
+ Park Heesob
data/Rakefile CHANGED
@@ -1,12 +1,10 @@
1
1
  require 'rake'
2
+ require 'rake/clean'
2
3
  require 'rake/testtask'
3
4
 
4
- namespace 'gem' do
5
- desc 'Delete any gem files in the project.'
6
- task :clean do
7
- Dir['*.gem'].each{ |f| File.delete(f) }
8
- end
5
+ CLEAN.include('**/*.gem')
9
6
 
7
+ namespace 'gem' do
10
8
  desc 'Create the win32-mmap gem.'
11
9
  task :create => [:clean] do
12
10
  spec = eval(IO.read('win32-mmap.gemspec'))
@@ -41,3 +39,5 @@ Rake::TestTask.new do |t|
41
39
  t.verbose = true
42
40
  t.warning = true
43
41
  end
42
+
43
+ task :default => :test