This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] strcpy optimizations


It's certainly the case that strcpy et al must never write to any byte
of the address space that its user-visible semantics do not allow it to
change.  (On a machine where the smallest size of write is larger than a
byte, then of course it can write the whole smallest possible unit
containing a byte that it's supposed to write.)  Likewise, they must not
attempt to read any byte where the attempt could produce semantics
outside the specified semantics.  Thus the admonition to be sure not to
read across a page boundary unless both pages are ones containing bytes
the semantics say to read unconditionally, since that could cause a
user-visible page fault signal.  (Things like cache effects are
permissible, so while reading a cache line you have no reason to read is
usually undesireable for performance, it is acceptable semantically and
so acceptable if it's part of a scheme whose overall performance
characteristics are the most preferable ones available.)


Thanks,
Roland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]