Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
17 crawler(s) on-line.
 97 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 matthey:  27 mins ago
 amigakit:  55 mins ago
 Maijestro:  1 hr 7 mins ago
 Hypex:  1 hr 8 mins ago
 fingus:  1 hr 30 mins ago
 dirkzwager:  1 hr 34 mins ago
 Karlos:  1 hr 49 mins ago
 amigagr:  1 hr 55 mins ago
 MagicSN:  2 hrs 4 mins ago
 pixie:  2 hrs 18 mins ago

/  Forum Index
   /  Amiga Development
      /  is shared correct kind memory when i allocate memory in AmigaOS4.1?
Register To Post

PosterThread
Vanhapolle 
is shared correct kind memory when i allocate memory in AmigaOS4.1?
Posted on 22-Dec-2014 14:18:04
#1 ]
Regular Member
Joined: 22-Sep-2014
Posts: 372
From: Unknown

is shared correct kind memory when i allocate memory in AmigaOS4.1? i dont here exact flag name only is "named" is important.

 Status: Offline
Profile     Report this post  
eliyahu 
Re: is shared correct kind memory when i allocate memory in AmigaOS4.1?
Posted on 22-Dec-2014 14:44:46
#2 ]
Super Member
Joined: 3-Mar-2010
Posts: 1958
From: Waterbury, Connecticut (USA)

@Vanhapolle

the best thing to do on this question is:

1. read the exec memory allocation section on the developer wiki thoroughly
2. make sure other AOS4 developers see this question by asking at os4coding.net or the developer support forum



-- eliyahu

Last edited by eliyahu on 22-Dec-2014 at 02:46 PM.
Last edited by eliyahu on 22-Dec-2014 at 02:45 PM.

_________________
"Physical reality is consistent with universal laws. When the laws do not operate, there is no reality. All of this is unreal."

 Status: Offline
Profile     Report this post  
broadblues 
Re: is shared correct kind memory when i allocate memory in AmigaOS4.1?
Posted on 22-Dec-2014 15:51:47
#3 ]
Amiga Developer Team
Joined: 20-Jul-2004
Posts: 4446
From: Portsmouth England

@Vanhapolle

Quote:

Is shared correct kind memory when i allocate memory in AmigaOS4.1? i dont here exact flag name only is "named" is important.


No, unless you want to share it, then yes.

For AmigaOS4 all memory should be allocated via AllocMemVecTags() system object should be allocated with AllocSysObject() that way the correct memory type is used.

Shared memeory is used if you wat to share memeory between processes, and private memory otherwise. Also to consider is whether the memeory is locked or not shared is locked by defaul ( for backwards comptabilty) but most often doesn't need to be.

Basically allocate all memory as private and unlocked unless you have specific reason not to, such as sharing it between tasks.

_________________
BroadBlues On Blues BroadBlues On Amiga Walker Broad

 Status: Offline
Profile     Report this post  
Vanhapolle 
Re: is shared correct kind memory when i allocate memory in AmigaOS4.1?
Posted on 23-Dec-2014 9:04:43
#4 ]
Regular Member
Joined: 22-Sep-2014
Posts: 372
From: Unknown

@eliyahu

I cannot wrote at least yet anything i dont own yet os i wait os. Even after this maybe needed do so something which allows writing OS4coding.net. AVT_Contiguous tag is maybe needed also when i use memory area WritePixelArray way? to me is hard
understand how single pointer can tell where my memory is.Someone maybe can tell to me how.

Last edited by Vanhapolle on 23-Dec-2014 at 09:10 AM.

 Status: Offline
Profile     Report this post  
Hans 
Re: is shared correct kind memory when i allocate memory in AmigaOS4.1?
Posted on 23-Dec-2014 10:53:03
#5 ]
Elite Member
Joined: 27-Dec-2003
Posts: 5067
From: New Zealand

@Vanhapolle

Quote:

Vanhapolle wrote:
@eliyahu

I cannot wrote at least yet anything i dont own yet os i wait os. Even after this maybe needed do so something which allows writing OS4coding.net. AVT_Contiguous tag is maybe needed also when i use memory area WritePixelArray way? to me is hard
understand how single pointer can tell where my memory is.Someone maybe can tell to me how.


No, you don't need AVT_Contiguous tag for memory that you wish to use with WritePixelArray.

As Broadblues said, you should allocate memory as private, unless it's memory that will be shared between tasks (e.g., messages, which you should be allocating with AllocSysObject(), anyway).

Hans

_________________
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
https://keasigmadelta.com/ - More of my work.

 Status: Offline
Profile     Report this post  
Vanhapolle 
Re: is shared correct kind memory when i allocate memory in AmigaOS4.1?
Posted on 23-Dec-2014 11:06:51
#6 ]
Regular Member
Joined: 22-Sep-2014
Posts: 372
From: Unknown

@Hans

good if want access it this way needs then
value which function returns + (x*bytesperpixel+y*width*bytesperpixel)
where is width is width of picture data,x is x coordinate pixel what i need access,and y is y coordinate pixel what i want address.bytesperpixel is value which tells how many bytes single pixel is. for ARGB its 4 and for RGB is 3 etc.
and formula should be correct one.

 Status: Offline
Profile     Report this post  
Vanhapolle 
Re: is shared correct kind memory when i allocate memory in AmigaOS4.1?
Posted on 25-Dec-2014 10:39:07
#7 ]
Regular Member
Joined: 22-Sep-2014
Posts: 372
From: Unknown

I am now really angry becouse i cannot solve this simple thing how i can write and read
values form this memory what i allocated. I hope someone can want help me. even sitll i asked so much.


 Status: Offline
Profile     Report this post  
Hypex 
Re: is shared correct kind memory when i allocate memory in AmigaOS4.1?
Posted on 25-Dec-2014 14:07:08
#8 ]
Elite Member
Joined: 6-May-2007
Posts: 11215
From: Greensborough, Australia

@Vanhapolle

Not to throw another spoon into the soup but probsbly using MEMF_ANY will suffice.

How have you declared your memory pointer? The following should work fine for example:

unit8 *RGB = image_ptr; // Or...

RGB = AllocVec(RGB_SIZE, MEMF_ANY);

unit red = RGB[];

uint8 green = RGB[1];

uint8 blue = *(RGB + 2);

// Untested.

 Status: Offline
Profile     Report this post  

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle