From: kiuchi@sys.meitec.co.jp (Hirohiko KIUCHI)
Newsgroups: fj.lang.c,fj.sys.rs6000,fj.sys.sun
Subject: Summary: memalign function for AIX
Date: 17 Aug 92 08:27:33 GMT
        <HHIURA.92Jul10211835@momo.Sun.COM>
	<CHIK.92Jul14102709@ss38.icot.or.jp> <701@idas.imslab.co.jp>
Followup-To: fj.lang.c
Distribution: fj
Organization: System Integrations operations, MEITEC CORPORATION, Nagoya 451,
	Japan.

$@%a%$%F%C%/$NLZFb$G$9!#$A$g$C$H8E$/$J$j$^$9$,!";d$N%]%9%H$7$?5-;v!'(J

In article <KIUCHI.92Jul10120534@yagi.sys.meitec.co.jp> kiuchi@sys.meitec.co.jp (Hirohiko KIUCHI) writes:

 > Newsgroups: fj.lang.c,fj.sys.rs6000,fj.sys.sun
 > Date: 10 Jul 92 03:05:34 GMT
 >
 > Sun OS $@MQ$K=q$+$l$?#C$N%W%m%0(J$@%i%`$r(JIBM RS/6000 $@$K0\?"$7$F$$$k(J
 > $@?M$NBeM}$G<ALd$5$;$F2<$5$$!#(J
 >
 > Sun $@$N(J C $@%i%$%0%i%j(J $@4X?t$G!"(Jmemalign() $@$H$$$&$b$N$,$"$j$^$9!#(J
 > $@%^%K%e%"%k$G$O!"(JMALLOC(3V)$@$K4^$^$l$F$*$j!"(J
 >
 > #include <malloc.h>
 > char *memalign(alignment, size)
 > unsigned alignment;
 > unsigned size;
 >
 > $@$G!";XDj$5$l$?6-(J$@3&$+$i(J size $@%P%$%H$N%9%Z!<%9$r3d$jIU$1$k$H$$(J
 > $@$&$3$H$G$9!#(J
 >
 > $@$H$3$m$,!"(JRS/6000 $@$N(JOS$@$G$"$k(JAIX$@$N(JC$@%i%$%V%i%j$K$O!"$3$N4X?t$,(J
 > $@$"$j$^$;$s!#(JSun $@$NFH<+$N$b$N$G$7$g$&$+!#(J
 >
 > $@$=$3$G!"<ALd$G$9$,!"(JAIX $@$G!"$3$N4X?t$NBe$o$j$r<B8=$9$k$K$O$I(J
 > $@$&$7$?$i$h$$$G$7$g$&$+!#(J

$@$KBP$7!"F|N)@=:n=j$N9uED$5$^$+$i!"(Jreply $@$r!"(J
Sun Microsystems, Inc. $@$NHu1:=(<y$5$^$+$i!"(Jfollow $@$r(J
$@$$$?$@$-!"99$K$3$l$KBP$7$F!"(JICOT $@$N(J $@6a(J$@;3$5$^!"(Jimslab
$@$N(J murakami $@$5$^$+$i(Jfollow $@$r$$$?$@$-$^$7$?!#(J

$@$"$j$,$H$&$4$6$$$^$7$?!#(J

$@%K%e!<%9$N(Jfollow$@$O$=$l$>$lC;$$$N$G!"0zMQ$G!"$^$H$a$H(J
$@$5$;$F$$$?$@$-$?$$$H;W$$$^$9!#(J

 > Date: Fri, 10 Jul 92 18:13:42 JST
 > From: kuroda@sdl.hitachi.co.jp (Takaki KURODA)
 >
 > $@9uED!wF|N)$G$9!#(J
 >
 > memalign$@$H$$$&(J$@$N$O=i$a$FJ9$-$^$7$?!#$?$V$s(JSun$@FH<+$N$b$N$@$H;W$$$^$9!#(J
 > 
 > align$@$7$?$$%5%$%:$@$1M>J,$K(Jmalloc$@$7$F!"(J$@%j%?%sCM$r(Jalign$@$7$?$i(J
 > $@NI$$$N$G$O$J$$$G$7$g$&$+!)(J
 >
 > char *memalign(size_t alignment, size_t size){
 >	   char *ret;
 >	   ret = malloc(size+alignment);
 >	   ret += alignment;
 > #if alignment$@$,#2(J^$@#N(J
 >	   ret &= log2(alignment);
 > #else
 >	   ret = ( ret / alignment ) * alignment;
 > #endif
 >	   return(ret) 
 >     }
 >
 > $@$H$$$&$H$3$m$G$I$&$G$7$g$&!#(J
 >
 > $@!t(J $@:G8e$N(Jalign$@$N$H$3$m$,5$$KF~$i$J$$(J$@$+$i!"D>$7$F$/$@$5$$!#(J

In article <HHIURA.92Jul10211835@momo.Sun.COM> hhiura@Sun.COM (Hideki Hiura) writes:

 > Date: 10 Jul 92 12:18:35 GMT
 >
 > memalign $@$r<BAu$9$k$N$OMF0W$@$H;W$$$^$9$,!"$=$l$rHr$1$?(J$@$$$H$9$k$H!"(J
 > $@=i4|2=J,CY$/$J$j$^$9$,!"(Jcalloc $@$GBeMQ$9$k<j$,$"$j$^$9!#(J
 > memalign $@$O!"(J0 $@=i4|2=$7$J$$(J$@!"(Jcalloc $@$H$_$J$;$^$9$N$G!#(J

$@$3$NHu1:$5$s$N(J follow $@$KBP$7!"(J

In article <CHIK.92Jul14102709@ss38.icot.or.jp> chik@icot.or.jp (Takashi Chikayama) writes:

 > Date: 14 Jul 92 01:27:09 GMT
 >
 > calloc $@$N(J alignment $@$O!V0z?t$KEO$5$l$?Bg$-$50JFb$N$b$N$J$i(J, $@$I$s$J(J C 
 > $@$N9=B$BN$r$*$$$F$b(J, $@$A$c$s$H%"%/%;%9$G(J$@$-$k!W$H$$$&$3$H$7$+J]>Z$7$F$$$J(J
 > $@$$$N$G$O$"$j$^$;$s$+(J?  $@$G$9$+$i(J, align $@$7$F$$$J$$(J word $@$d(J double word 
 > $@$r(J load/store $@$G$-$k5!3#$G$O(J, $@2?$N(J alignment $@$b$5$l$J$$$+$b$7$l$J$$$N(J
 > $@$@(J, $@$H;d$O;W$C$F$$$^(J$@$7$?$,(J, $@4V0c$$$G$7$g$&$+(J.
 >
 > $@0lJ}(J memalign $@$NJ}$OI,$:;XDj$7$?(J alignment $@$,$J$5$l$k$N$@$H;W$$$^$9(J.
 >
 > $@%]%$%s%?$N2<(J3$@%S%C%H$r%?%0$K;H$$$?$$(J, $@$H$+;W$C$F$$$k;d$K$H$C$F$b(J, $@%7%9(J
 > $@%F%`$N%]!<%?%S%j%F%#$N(J$@>e$G=EMW$JLdBj$J$N$G(J...

$@$H$NLd$$$+$1$,$"$j$^$7$?$,!";DG0$J$,$i5DO@$K$O$J$j$^$;$s$G$7$?!#(J

$@0lJ}!"(Jmurakami $@$5$s$N!"(J

In article <701@idas.imslab.co.jp> murakami@idas.imslab.co.jp (Mr.Murakami) writes:

 > Date: 14 Jul 92 01:35:07 GMT
 >
 >      $@$=$l$O!"(JBSD$@$H(JSystem V$@$N0c$$$J$N$G$7$g$&$+!#(J

$@$K$D$$$F$O!"9u(J$@ED$5$s$N$$$o$l$k$h$&$K!"(JSun $@FH<+$N$b$N$N$h$&$G$9$M!#(J

$@7kO@$H$7$F!"$3$A$i$NC4Ev<T$O!":G=i$K%a!<%k$r$$$?(J$@$@$$$?9uED$5$s$N(J
$@J}K!$GBP1~$7$^$7$?!#(J
--
($@3t(J)$@%a%$%F%C%/!!#S#I;v6HItBh0l5;=QItBhFs%7%9%F%`<<(J
        $@LZ(J$@Fb9@I'(J / E-mail: kiuchi@meitec.co.jp
        TEL: (052)532-6516 / FAX: (052)532-6554
Newsgroups: fj.lang.postscript