Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0b39d1a8
Commit
0b39d1a8
authored
Jul 24, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libwine: Added a function to enumerate the reserved mmap areas.
parent
c0596e0a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
0 deletions
+39
-0
library.h
include/wine/library.h
+2
-0
mmap.c
libs/wine/mmap.c
+35
-0
wine.def
libs/wine/wine.def
+1
-0
wine.map
libs/wine/wine.map
+1
-0
No files found.
include/wine/library.h
View file @
0b39d1a8
...
...
@@ -75,6 +75,8 @@ extern void *wine_anon_mmap( void *start, size_t size, int prot, int flags );
extern
void
wine_mmap_add_reserved_area
(
void
*
addr
,
size_t
size
);
extern
void
wine_mmap_remove_reserved_area
(
void
*
addr
,
size_t
size
,
int
unmap
);
extern
int
wine_mmap_is_in_reserved_area
(
void
*
addr
,
size_t
size
);
extern
int
wine_mmap_enum_reserved_areas
(
int
(
*
enum_func
)(
void
*
base
,
size_t
size
,
void
*
arg
),
void
*
arg
,
int
top_down
);
/* LDT management */
...
...
libs/wine/mmap.c
View file @
0b39d1a8
...
...
@@ -539,3 +539,38 @@ int wine_mmap_is_in_reserved_area( void *addr, size_t size )
}
return
0
;
}
/***********************************************************************
* wine_mmap_enum_reserved_areas
*
* Enumerate the list of reserved areas, sorted by addresses.
* If enum_func returns a non-zero value, enumeration is stopped and the value is returned.
*
* Note: the reserved areas functions are not reentrant, caller is
* responsible for proper locking.
*/
int
wine_mmap_enum_reserved_areas
(
int
(
*
enum_func
)(
void
*
base
,
size_t
size
,
void
*
arg
),
void
*
arg
,
int
top_down
)
{
int
ret
=
0
;
struct
list
*
ptr
;
if
(
top_down
)
{
for
(
ptr
=
reserved_areas
.
prev
;
ptr
!=
&
reserved_areas
;
ptr
=
ptr
->
prev
)
{
struct
reserved_area
*
area
=
LIST_ENTRY
(
ptr
,
struct
reserved_area
,
entry
);
if
((
ret
=
enum_func
(
area
->
base
,
area
->
size
,
arg
)))
break
;
}
}
else
{
for
(
ptr
=
reserved_areas
.
next
;
ptr
!=
&
reserved_areas
;
ptr
=
ptr
->
next
)
{
struct
reserved_area
*
area
=
LIST_ENTRY
(
ptr
,
struct
reserved_area
,
entry
);
if
((
ret
=
enum_func
(
area
->
base
,
area
->
size
,
arg
)))
break
;
}
}
return
ret
;
}
libs/wine/wine.def
View file @
0b39d1a8
...
...
@@ -103,6 +103,7 @@ EXPORTS
wine_ldt_realloc_entries
wine_ldt_set_entry
wine_mmap_add_reserved_area
wine_mmap_enum_reserved_areas
wine_mmap_is_in_reserved_area
wine_mmap_remove_reserved_area
wine_pthread_get_functions
...
...
libs/wine/wine.map
View file @
0b39d1a8
...
...
@@ -103,6 +103,7 @@ WINE_1.0
wine_ldt_realloc_entries;
wine_ldt_set_entry;
wine_mmap_add_reserved_area;
wine_mmap_enum_reserved_areas;
wine_mmap_is_in_reserved_area;
wine_mmap_remove_reserved_area;
wine_pthread_get_functions;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment